| Constructor and Description |
|---|
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 |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getSource()
Returns the underlying content.
|
InputStream |
openStream()
Get a input stream for the resource content.
|
String |
toString() |
public ByteArrayAsset(byte[] content)
throws IllegalArgumentException
Asset instance backed by the specified byte arraycontent - IllegalArgumentException - If the contents were not specifiedpublic ByteArrayAsset(InputStream stream)
Asset instance backed by the bytes contained in the the specified InputStreamstream - IllegalArgumentException - If the stream is not specifiedpublic InputStream openStream()
AssetopenStream in interface AssetInputStream for each callAsset.openStream()public byte[] getSource()
public String toString()
toString in class ObjectObject.toString()Copyright © 2012 JBoss by Red Hat. All Rights Reserved.