Class MemoryNamedAsset
- java.lang.Object
-
- org.jboss.shrinkwrap.api.nio.file.MemoryAsset
-
- org.jboss.shrinkwrap.api.nio.file.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 theNamedAsset
API; thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
-
Constructor Summary
Constructors Constructor Description MemoryNamedAsset(java.lang.String name)
Sets the name of thisMemoryNamedAsset
to the specified (required)String
nameMemoryNamedAsset(java.nio.file.Path path)
MemoryNamedAsset(ArchivePath path)
Sets the name of thisMemoryNamedAsset
viaArchivePath.get()
of the specified (required)ArchivePath
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
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(java.lang.String name) throws java.lang.IllegalArgumentException
Sets the name of thisMemoryNamedAsset
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
- 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 thisMemoryNamedAsset
viaArchivePath.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 interfaceNamedAsset
- Returns:
String
representation of the ArchivePath- See Also:
NamedAsset.getName()
-
-