| java.lang.Object java.io.OutputStream org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream
DynamicByteArrayOutputStream | public class DynamicByteArrayOutputStream extends OutputStream (Code) | | A DynamicByteArrayOutputStream allows writing to a dynamically resizable
array of bytes. In addition to dynamic resizing, this extension allows
the user of this class to have more control over the position of the stream
and can get a direct reference of the array.
|
DynamicByteArrayOutputStream | public DynamicByteArrayOutputStream()(Code) | | |
DynamicByteArrayOutputStream | public DynamicByteArrayOutputStream(int size)(Code) | | |
DynamicByteArrayOutputStream | public DynamicByteArrayOutputStream(byte[] data)(Code) | | |
close | public void close()(Code) | | |
discardLeft | public void discardLeft(int amountToShrinkBy)(Code) | | Shrink the buffer left by the amount given. Ie.
bytes from 0 to amountToShrinkBy are thrown away
|
getBeginPosition | public int getBeginPosition()(Code) | | Get the current position in the stream
|
getByteArray | public byte[] getByteArray()(Code) | | Get a reference to the byte array stored in the byte array output
stream. Note that the byte array may be longer that getPosition().
Bytes beyond and including the current poistion are invalid.
|
getPosition | public int getPosition()(Code) | | Get the current position in the stream
|
getUsed | public int getUsed()(Code) | | Get the number of bytes that was used.
|
reset | public void reset()(Code) | | Reset the stream for reuse
|
setBeginPosition | public void setBeginPosition(int newBeginPosition)(Code) | | Set the begin position of the stream pointer.
If the newBeginPosition is larger than the stream itself,
then, the begin position is not set.
|
setPosition | public void setPosition(int newPosition)(Code) | | Set the position of the stream pointer.
It is up to the caller to make sure the stream has no gap of garbage in
it or useful information is not left out at the end because the stream
does not remember anything about the previous position.
|
write | public void write(int b)(Code) | | |
write | public void write(byte[] b, int off, int len)(Code) | | |
|
|