Class MemoryNamedAsset
java.lang.Object
org.jboss.shrinkwrap.api.asset.MemoryAsset
org.jboss.shrinkwrap.api.asset.MemoryNamedAsset
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, ReadableByteChannel, SeekableByteChannel, WritableByteChannel, Asset, NamedAsset
MemoryAsset implementation complying to the NamedAsset API; thread-safe.- Author:
- Andrew Lee Rubinger
-
Constructor Summary
ConstructorsConstructorDescriptionMemoryNamedAsset(String name) Sets the name of thisMemoryNamedAssetto the specified (required)StringnameMemoryNamedAsset(Path path) MemoryNamedAsset(ArchivePath path) Sets the name of thisMemoryNamedAssetviaArchivePath.get()of the specified (required)ArchivePath -
Method Summary
Methods inherited from class MemoryAsset
close, isOpen, openStream, position, position, read, size, truncate, writeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Asset
openStream
-
Constructor Details
-
MemoryNamedAsset
Sets the name of thisMemoryNamedAssetto the specified (required)Stringname- Parameters:
name- The name of thisMemoryNamedAsset. Must not benull.- Throws:
IllegalArgumentException- If the name is not specified
-
MemoryNamedAsset
- Parameters:
path- ThePathwhosePath.toString()will be used as the name ofMemoryNamedAsset. Must not benull.- Throws:
IllegalArgumentException- If the path is not specified
-
MemoryNamedAsset
Sets the name of thisMemoryNamedAssetviaArchivePath.get()of the specified (required)ArchivePath- Parameters:
path- TheArchivePathwhoseArchivePath.get()will be used as the name of thisMemoryNamedAsset. Must not benull.- Throws:
IllegalArgumentException- If the path is not specified
-
-
Method Details
-
getName
Specifies the name (ArchivePath) for the archive- Specified by:
getNamein interfaceNamedAsset- Returns:
Stringrepresentation of the ArchivePath- See Also:
-