|
|||||||||||
| 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
BufferedOutputStream adds functionality to another output stream. The main functionality it adds is the ability to buffer the output before writing it to the underlying stream.
| Field Summary | |
protected byte[] |
buf
|
protected int |
count
|
| Constructor Summary | |
BufferedOutputStream(OutputStream os)
Creates a BufferedOutputStream adding functionality to the passed output stream. |
|
BufferedOutputStream(OutputStream os,
int size)
Creates a BufferedOutputStream adding functionality to the passed output stream. |
|
| Method Summary | |
void |
flush()
Writes the contents of the buffer to the underlying stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from offset off of the passed array b to the buffer. |
void |
write(int i)
Writes a single character (passed as an integer value) to the buffer. |
| Methods inherited from class java.io.FilterOutputStream |
close, write |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, toString |
| Field Detail |
protected byte[] buf
protected int count
| Constructor Detail |
public BufferedOutputStream(OutputStream os)
os - underlying output stream.
public BufferedOutputStream(OutputStream os,
int size)
os - underlying output stream.size - buffer size.| Method Detail |
public void flush()
throws IOException
flush in class FilterOutputStreamIOException - if an I/O error occurs.
public void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamb - data.off - start offset within data.len - number of bytes to be written.
IOException - if an I/O error occurs.
public void write(int i)
throws IOException
write in class FilterOutputStreami - character to be written.
IOException - if an I/O error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||