| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private byte[] | |
| private static int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Implements java. Closes this output stream and releases any system resources associated with this stream. |
| public void | |
| private void | expandBuffer(int minExtension)
Expand the buffer by at least the number of bytes requested in minExtension. |
| public int | |
| public byte[] | Returns: the wrapped byte arrayGet a reference to the byte array stored in the byte array output stream. |
| public int | |
| public int | |
| public void | |
| public void | setBeginPosition(int
The new start position newBeginPosition)Set the begin position of the stream pointer. |
| public void | setPosition(int
The new position of the stream pointer newPosition)Set the position of the stream pointer. |
| public void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. Writes |
| pack-priv void |
| beginPosition | back to summary |
|---|---|
| private int beginPosition | |
| buf | back to summary |
|---|---|
| private byte[] buf | |
| INITIAL_SIZE | back to summary |
|---|---|
| private static int INITIAL_SIZE | |
| position | back to summary |
|---|---|
| private int position | |
| used | back to summary |
|---|---|
| private int used | |
| DynamicByteArrayOutputStream | back to summary |
|---|---|
| public DynamicByteArrayOutputStream() | |
| DynamicByteArrayOutputStream | back to summary |
|---|---|
| public DynamicByteArrayOutputStream(int size) | |
| DynamicByteArrayOutputStream | back to summary |
|---|---|
| public DynamicByteArrayOutputStream(byte[] data) | |
| DynamicByteArrayOutputStream | back to summary |
|---|---|
| public DynamicByteArrayOutputStream(DynamicByteArrayOutputStream toBeCloned) | |
| close | back to summary |
|---|---|
| public void close() Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of | |
| discardLeft | back to summary |
|---|---|
| public void discardLeft(int amountToShrinkBy) Shrink the buffer left by the amount given. Ie. bytes from 0 to amountToShrinkBy are thrown away
| |
| expandBuffer | back to summary |
|---|---|
| private void expandBuffer(int minExtension) Expand the buffer by at least the number of bytes requested in minExtension. To optimize performance and reduce memory copies and allocation, we have a staged buffer expansion.
| |
| getBeginPosition | back to summary |
|---|---|
| public int getBeginPosition() Get the current position in the stream
| |
| getByteArray | back to summary |
|---|---|
| public byte[] getByteArray() 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 | back to summary |
|---|---|
| public int getPosition() Get the current position in the stream
| |
| getUsed | back to summary |
|---|---|
| public int getUsed() Get the number of bytes that was used.
| |
| reset | back to summary |
|---|---|
| public void reset() Reset the stream for reuse | |
| setBeginPosition | back to summary |
|---|---|
| public void setBeginPosition(int newBeginPosition) 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 | back to summary |
|---|---|
| public void setPosition(int newPosition) 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 | back to summary |
|---|---|
| public void write(int b) Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public void write(byte[] b, int off, int len) Overrides java. Doc from java. Writes
If
If
| |
| writeCompleteStream | back to summary |
|---|---|
| pack-priv void writeCompleteStream(InputStream dataIn, int len) throws IOException | |