| 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()
AssetAsset is to be viewed as a logical path (placeholder/directory) only with no
backing content.openStream in interface AssetInputStream for each call, or null if this type simply represents a logical path
within an ArchiveAsset.openStream()public byte[] getSource()
public String toString()
toString in class ObjectObject.toString()Copyright © 2012 JBoss by Red Hat. All Rights Reserved.