📜  Java.io.FilterOutputStream类

📅  最后修改于: 2020-11-15 02:43:55             🧑  作者: Mango


介绍

Java.io.FilterOutputStream类是所有过滤输出流的类的超类。以下是关于FilterOutputStream的要点-

  • 该类本身只是使用将所有请求传递到包含的输出流的版本来覆盖OutputStream的所有方法。

  • 此类的子类可以进一步覆盖其中的某些方法,还可以提供其他方法和字段。

类声明

以下是Java.io.FilterOutputStream类的声明-

public class FilterOutputStream
   extends OutputStream

领域

以下是Java.io.FilterOutputStream类的字段-

  • protected OutputStream out-这是要过滤的输出流。

类的构造函数

Sr.No. Constructor & Description
1

FilterOutputStream(OutputStream out)

This creates an output stream filter built on top of the specified underlying output stream.

类方法

Sr.No. Method & Description
1 void close()

This method closes this output stream and releases any system resources associated with the stream.

2 void flush()

This method flushes this output stream and forces any buffered output bytes to be written out to the stream.

3 void write(byte[] b)

This method writes b.length bytes to this output stream.

4 void write(byte[] b, int off, int len)

This method writes len bytes from the specified byte array starting at offset off to this output stream.

5 void write(int b)

This method writes the specified byte to this output stream.

方法继承

此类从以下类继承方法-

  • Java对象