java.lang.Object | +----java.io.OutputStream
这个类是一个抽象类,表示所有字节输出流的类的父类。
需要定义 OutputStream 子类的应用程序必须提供至少一个用于输出一个字节的方法。
b.length 字节,写到当前输出流。
off 开始的
len个字节,写到当前输出流。
public OutputStream()
public abstract void write(int b) throws IOException
OutputStream 的子类必须提供此方法的一个实现。
字节。
public void write(byte b[]) throws IOException
b.length 字节,写到当前输出流。
OutputStream 的 write 方法,用三个参数
b, 0 和 b.length 调用具有三个参数的 write 方法。
public void write(byte b[],
int off,
int len) throws IOException
off 开始的
len 个字节,写到当前输出流。
OutputStream 的 write 方法,调用一个参数的
write 方法,输出每个字节。 子类应覆盖这个方法,并提供更有效的实现方法。
public void flush() throws IOException
OutputStream 的 flush 方法不做任何事。
public void close() throws IOException
OutputStream 的 close 方法不做任何事。