📜  Java.io.OutputStream类

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


介绍

Java.io.OutputStream类是表示字节输出流的所有类的超类。输出流接受输出字节并将其发送到某些接收器。需要定义OutputStream子类的应用程序必须始终提供至少一个写入一个字节输出的方法。

类声明

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

public abstract class OutputStream
   extends Object
      implements Closeable, Flushable

类的构造函数

Sr.No. Constructor & Description
1

OutputStream()

Single Constructor.

类方法

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

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

2 void flush()

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

3 void write(byte[] b)

This method writes b.length bytes from the specified byte array 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 abstract void write(int b)

This method writes the specified byte to this output stream.

方法继承

此类从以下类继承方法-

  • Java对象