|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.io.OutputStream
|
+--java.io.FilterOutputStream
|
+--java.io.BufferedOutputStream
A buffered output stream. This stream lets you write characters to a stream without causing a write every time. The data is first written into a buffer. Data is written to the actual stream only when the buffer is full, or when the stream is flushed.
| Field Summary | |
protected byte[] |
buf
The buffer where data is stored. |
protected int |
count
The number of bytes in the buffer. |
| Fields inherited from class java.io.FilterOutputStream |
out |
| Constructor Summary | |
BufferedOutputStream(OutputStream out)
Creates a new buffered stream with a default buffer size. |
|
BufferedOutputStream(OutputStream out,
int size)
Creates a new buffered stream with the specified buffer size. |
|
| Method Summary | |
void |
flush()
Flushes the stream. |
void |
write(byte[] b,
int off,
int len)
Writes a subarray of bytes. |
void |
write(int b)
Writes a byte. |
| Methods inherited from class java.io.FilterOutputStream |
close, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected byte[] buf
protected int count
| Constructor Detail |
public BufferedOutputStream(OutputStream out)
out - the output stream
public BufferedOutputStream(OutputStream out,
int size)
out - the output streamsize - the buffer size| Method Detail |
public void write(int b)
throws IOException
write in class FilterOutputStreamb - the byte to be written
IOException - If an I/O error has occurred.
public void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamb - the data to be writtenoff - the start offset in the datalen - the number of bytes that are written
IOException - If an I/O error has occurred.
public void flush()
throws IOException
flush in class FilterOutputStreamIOException - If an I/O error has occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||