The stream zeroes out the internal buffer on each flush.
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private int | |
| private final OutputStream |
| Access | Constructor and Description |
|---|---|
| public | BufferingOutputStream(OutputStream
output stream to be wrapped. other)Create a buffering stream with the default buffer size (4096). |
| public | BufferingOutputStream(OutputStream
output stream to be wrapped. other, int size in bytes for internal buffer. bufferSize)Create a buffering stream with a specified buffer size. |
| 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 | flush()
Overrides java. Implements java. Flush the internal buffer to the encapsulated output stream. |
| public void | write(byte[]
the data. bytes, int the start offset in the data. offset, int the number of bytes to write. len)Overrides java. Writes |
| public void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| buf | back to summary |
|---|---|
| private final byte[] buf | |
| bufOff | back to summary |
|---|---|
| private int bufOff | |
| other | back to summary |
|---|---|
| private final OutputStream other | |
| BufferingOutputStream | back to summary |
|---|---|
| public BufferingOutputStream(OutputStream other) Create a buffering stream with the default buffer size (4096).
| |
| BufferingOutputStream | back to summary |
|---|---|
| public BufferingOutputStream(OutputStream other, int bufferSize) Create a buffering stream with a specified buffer size.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this output stream and releases any system resources
associated with this stream. The general contract of
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Flush the internal buffer to the encapsulated output stream. Zero the buffer contents when done.
| |
| write | back to summary |
|---|---|
| public void write(byte[] bytes, int offset, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |
| write | back to summary |
|---|---|
| public void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |