Class MemoryNamedAsset
- java.lang.Object
-
- org.jboss.shrinkwrap.api.nio.file.MemoryAsset
-
- org.jboss.shrinkwrap.api.nio.file.MemoryNamedAsset
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,SeekableByteChannel,WritableByteChannel,Asset,NamedAsset
public class MemoryNamedAsset extends MemoryAsset implements NamedAsset
MemoryAssetimplementation complying to theNamedAssetAPI; thread-safe.- Author:
- Andrew Lee Rubinger
-
-
Constructor Summary
Constructors Constructor Description MemoryNamedAsset(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Specifies the name (ArchivePath) for the archive-
Methods inherited from class org.jboss.shrinkwrap.api.nio.file.MemoryAsset
close, isOpen, openStream, position, position, read, size, truncate, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.shrinkwrap.api.asset.Asset
openStream
-
-
-
-
Constructor Detail
-
MemoryNamedAsset
public MemoryNamedAsset(String name) throws IllegalArgumentException
Sets the name of thisMemoryNamedAssetto the specified (required)Stringname- Parameters:
path-- Throws:
IllegalArgumentException- If the name is not specified
-
MemoryNamedAsset
public MemoryNamedAsset(Path path) throws IllegalArgumentException
- Parameters:
path-- Throws:
IllegalArgumentException- If the path is not specified
-
MemoryNamedAsset
public MemoryNamedAsset(ArchivePath path) throws IllegalArgumentException
Sets the name of thisMemoryNamedAssetviaArchivePath.get()of the specified (required)ArchivePath- Parameters:
path-- Throws:
IllegalArgumentException- If the path is not specified
-
-
Method Detail
-
getName
public String getName()
Specifies the name (ArchivePath) for the archive- Specified by:
getNamein interfaceNamedAsset- Returns:
Stringrepresentation of the ArchivePath- See Also:
NamedAsset.getName()
-
-