public class BufferingOutputStream
extends java.io.OutputStream
The stream zeroes out the internal buffer on each flush.
| Constructor and Description |
|---|
BufferingOutputStream(java.io.OutputStream other)
Create a buffering stream with the default buffer size (4096).
|
BufferingOutputStream(java.io.OutputStream other,
int bufferSize)
Create a buffering stream with a specified buffer size.
|
public BufferingOutputStream(java.io.OutputStream other)
other - output stream to be wrapped.public BufferingOutputStream(java.io.OutputStream other,
int bufferSize)
other - output stream to be wrapped.bufferSize - size in bytes for internal buffer.public void write(byte[] bytes,
int offset,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - on error.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException