|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.shrinkwrap.api.asset.ByteArrayAsset
public class ByteArrayAsset
Implementation of an Asset
backed by a byte array
Constructor Summary | |
---|---|
ByteArrayAsset(byte[] content)
Creates a new Asset instance backed by the specified
byte array |
|
ByteArrayAsset(InputStream stream)
Creates a new Asset instance backed by the bytes
contained in the the specified InputStream |
Method Summary | |
---|---|
InputStream |
openStream()
Get a input stream for the resource content. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayAsset(byte[] content) throws IllegalArgumentException
Asset
instance backed by the specified
byte array
content
-
IllegalArgumentException
- If the contents were not specifiedpublic ByteArrayAsset(InputStream stream)
Asset
instance backed by the bytes
contained in the the specified InputStream
stream
-
IllegalArgumentException
- If the stream is not specifiedMethod Detail |
---|
public InputStream openStream()
Asset
Asset
is to be viewed as a logical path (placeholder/directory)
only with no backing content.
openStream
in interface Asset
InputStream
for each call, or null if this
type simply represents a logical path within an Archive
Asset.openStream()
public String toString()
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |