| Modifier and Type | Field and Description |
|---|---|
private byte[] |
content
Underlying content
|
private static java.util.logging.Logger |
log
Logger
|
| Constructor and Description |
|---|
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 |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getSource()
Returns the underlying content.
|
java.io.InputStream |
openStream()
Get a input stream for the resource content.
|
java.lang.String |
toString() |
private static final java.util.logging.Logger log
private final byte[] content
public ByteArrayAsset(byte[] content)
throws java.lang.IllegalArgumentException
Asset instance backed by the specified byte arraycontent - 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 InputStreamstream - java.lang.IllegalArgumentException - If the stream is not specifiedpublic java.io.InputStream openStream()
AssetopenStream in interface AssetInputStream for each callAsset.openStream()public byte[] getSource()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()