OutputStream是输入字节流的父类,它是⼀个抽象类(⼀般用他的子类)。
常用方法 | 描述(未实现,不可用) |
---|---|
void write(int b) | 将指定的字节输出 |
void write(byte b[]) | 从b数组中输出b.length个字节 |
void write(byte b[], int off, int len) | 从b数组中输出len个字节,从b[off]开始 |
void flush() | 将缓冲区的数据强制写入到外界设备(磁盘等),清空缓冲区 |
void close() | 关闭输入流,释放相关资源 |
跳转链接:InputStream、Reader、Writer、IO流
子类:FileOutputStream、BufferedOutputStream