| 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 specified InputStream |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getSource()
Returns the underlying content.
|
InputStream |
openStream()
Get an input stream for the resource content.
|
String |
toString() |
public ByteArrayAsset(byte[] content)
throws IllegalArgumentException
Asset instance backed by the specified byte arraycontent - The byte array that will be used as the data source for the new ByteArrayAssetIllegalArgumentException - If the contents were not specifiedpublic ByteArrayAsset(InputStream stream)
Asset instance backed by the bytes contained in the specified InputStreamstream - The InputStream to read bytes fromIllegalArgumentException - 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 © 2024 JBoss by Red Hat. All rights reserved.