|
||||||||||
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(java.io.InputStream stream)
Creates a new Asset instance backed by the bytes
contained in the the specified InputStream |
Method Summary | |
---|---|
java.io.InputStream |
openStream()
Get a input stream for the resource content. |
java.lang.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 java.lang.IllegalArgumentException
Asset
instance backed by the specified
byte array
content
-
java.lang.IllegalArgumentException
- If the contents were not specifiedpublic ByteArrayAsset(java.io.InputStream stream)
Asset
instance backed by the bytes
contained in the the specified InputStream
stream
-
java.lang.IllegalArgumentException
- If the stream is not specifiedMethod Detail |
---|
public java.io.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 java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |