saker.build Documentation TaskDoc JavaDoc Packages
public class ByteArrayStreamWritable implements StreamWritable
StreamWritable implementation that is backed by a byte array.
Constructors
public
Creates a new instance for the given array region.
public
Creates a new instance for the given array.
Methods
public ByteArrayRegion
Gets the byte array region that this class holds.
public void
Writes the contents to the parameter stream.
public void
Writes the contents to the parameter stream.
Creates a new instance for the given array region.
dataThe byte array region.
NullPointerExceptionIf the argument is null.
public ByteArrayStreamWritable(byte[] data) throws NullPointerException
Creates a new instance for the given array.
dataThe byte array.
NullPointerExceptionIf the argument is null.
Gets the byte array region that this class holds.
The byte array region.
public void writeTo(OutputStream os) throws IOException
Overridden from: StreamWritable
Writes the contents to the parameter stream.

The method implementations mustn't close the argument output.

osThe stream to write the contents to.
IOExceptionIn case of I/O error.
public void writeTo(ByteSink sink) throws IOException
Overridden from: StreamWritable
Writes the contents to the parameter stream.

The method implementations mustn't close the argument output.

sinkThe stream to write the contents to.
IOExceptionIn case of I/O error.