Class MemoryNamedAsset

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.ByteChannel, java.nio.channels.Channel, java.nio.channels.ReadableByteChannel, java.nio.channels.SeekableByteChannel, java.nio.channels.WritableByteChannel, Asset, NamedAsset

    public class MemoryNamedAsset
    extends MemoryAsset
    implements NamedAsset
    MemoryAsset implementation complying to the NamedAsset API; thread-safe.
    • Field Detail

      • name

        private final java.lang.String name
    • Constructor Detail

      • MemoryNamedAsset

        public MemoryNamedAsset​(java.lang.String name)
                         throws java.lang.IllegalArgumentException
        Sets the name of this MemoryNamedAsset to the specified (required) String name
        Parameters:
        path -
        Throws:
        java.lang.IllegalArgumentException - If the name is not specified
      • MemoryNamedAsset

        public MemoryNamedAsset​(java.nio.file.Path path)
                         throws java.lang.IllegalArgumentException
        Sets the name of this MemoryNamedAsset via Path.toString() of the specified (required) Path
        Parameters:
        path -
        Throws:
        java.lang.IllegalArgumentException - If the path is not specified
      • MemoryNamedAsset

        public MemoryNamedAsset​(ArchivePath path)
                         throws java.lang.IllegalArgumentException
        Sets the name of this MemoryNamedAsset via ArchivePath.get() of the specified (required) ArchivePath
        Parameters:
        path -
        Throws:
        java.lang.IllegalArgumentException - If the path is not specified
    • Method Detail

      • getName

        public java.lang.String getName()
        Specifies the name (ArchivePath) for the archive
        Specified by:
        getName in interface NamedAsset
        Returns:
        String representation of the ArchivePath
        See Also:
        NamedAsset.getName()