public class ByteArraySource extends java.lang.Object implements Source, java.io.Serializable
DEFAULT_CHARACTER_SET_ENCODING| Constructor and Description |
|---|
ByteArraySource(byte[] bytes) |
ByteArraySource(byte[] bytes, int pos, int count) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Returns the underlying byte-array.
|
java.io.InputStream |
getInputStream(TransformOptions options)
Returns streaming byte-baseed representation of the Source's content.
|
void |
writeTo(java.io.OutputStream out, TransformOptions options)
Serializes the Source's content to a byte-based stream.
|
public ByteArraySource(byte[] bytes)
public ByteArraySource(byte[] bytes,
int pos,
int count)
public byte[] getBytes()
ByteArraySource.public java.io.InputStream getInputStream(TransformOptions options) throws java.io.IOException, TransformException
SourcegetInputStream in interface Sourceoptions - Options used to affect the serializationjava.io.IOExceptionTransformException
public void writeTo(java.io.OutputStream out,
TransformOptions options)
throws java.io.IOException,
TransformException
SourceNote that this method may involve an internal transformation, although it should not in any way change the underlying content.
writeTo in interface Sourceout - the OutputStream to which serialized content will be writtenoptions - TransformOptions used to affect the serializationjava.io.IOExceptionTransformException