public class CopiableBytesStream
extends java.io.ByteArrayOutputStream
CopiableBytesStream
is a ByteArrayOutputStream
equipped with methods allowing the array contents to be copied
to some other output-stream or to a Java ARP output-stream.Constructor and Description |
---|
CopiableBytesStream(int capacity)
Constructs a new instance with the specified initial capacity
in bytes, with
doszpfx defaulting to true . |
CopiableBytesStream(int capacity,
boolean doszpfx)
Constructs a new instance with the specified initial capacity
in bytes, and whose output methods will or will not prefix the
data with a little-endian integer giving the data-block size in
bytes, as determined by the second parameter.
|
Modifier and Type | Method and Description |
---|---|
void |
copyData(JAOutputStream jouts)
Copies the data from this stream's backing array to the
specified Java ARP output stream.
|
void |
copyData(java.io.OutputStream outs)
Copies the data from this stream's backing array to the
specified output stream.
|
public CopiableBytesStream(int capacity)
doszpfx
defaulting to true
.public CopiableBytesStream(int capacity, boolean doszpfx)
public void copyData(JAOutputStream jouts) throws java.io.IOException
java.io.IOException
public void copyData(java.io.OutputStream outs) throws java.io.IOException
java.io.IOException