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 InputStream
stream
- IllegalArgumentException
- If the stream is not specifiedpublic InputStream openStream()
Asset
openStream
in interface Asset
InputStream
for each callAsset.openStream()
public byte[] getSource()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2016 JBoss by Red Hat. All rights reserved.