📅  最后修改于: 2020-11-15 02:38:16             🧑  作者: Mango
Java.io.BufferedOutputStream类实现一个缓冲的输出流。通过设置这样的输出流,应用程序可以将字节写入底层输出流,而不必为写入的每个字节引起对底层系统的调用。
以下是Java.io.BufferedOutputStream类的声明-
public class BufferedOutputStream
extends FilterOutputStream
以下是Java.io.BufferedOutputStream类的字段-
protected byte [] buf-这是存储数据的内部缓冲区。
protected int count-这是缓冲区中有效字节的数量。
protected OutputStream out-这是要过滤的基础输出流。
Sr.No. | Constructor & Description |
---|---|
1 |
BufferedOutputStream(OutputStream out) This creates a new buffered output stream to write data to the specified underlying output stream. |
2 |
BufferedOutputStream(OutputStream out, int size) This creates a new buffered output stream to write data to the specified underlying output stream with the specified buffer size. |
Sr.No. | Method & Description |
---|---|
1 | void flush()
This method flushes this buffered output stream. |
2 | void write(byte[] b, int off, int len)
This method writes len bytes from the specified byte array starting at offset off to this buffered output stream. |
3 | void write(int b)
This method writes the specified byte to this buffered output stream. |
此类从以下类继承方法-