构造方法摘要
Constructor and DescriptionBufferedInputStream(InputStream in)创建一个 BufferedInputStream并保存其参数,输入流 in ,供以后使用。BufferedInputStream(InputStream in, int size)创建 BufferedInputStream具有指定缓冲区大小,并保存其参数,输入流 in ,供以后使用。
方法摘要
Modifier and TypeMethod and Descriptionintavailable()返回从该输入流中可以读取(或跳过)的字节数的估计值,而不会被下一次调用此输入流的方法阻塞。voidclose()关闭此输入流并释放与流相关联的任何系统资源。voidmark(int readlimit)见的总承包 mark的方法 InputStream 。booleanmarkSupported()测试这个输入流是否支持 mark和 reset方法。intread()见 read法 InputStream的一般合同。intread(byte[] b, int off, int len)从给定的偏移开始,将字节输入流中的字节读入指定的字节数组。voidreset()见 reset法 InputStream的一般合同。longskip(long n)见 skip法 InputStream的一般合同。
BufferedOutputStream
BufferedOutputStream是字节流,实现缓冲的输出流,可以将多个字节写入底层输出流中,而不必对每次字节写入调用底层系统。
Constructor and DescriptionBufferedOutputStream(OutputStream out)创建一个新的缓冲输出流,以将数据写入指定的底层输出流。BufferedOutputStream(OutputStream out, int size)创建一个新的缓冲输出流,以便以指定的缓冲区大小将数据写入指定的底层输出流。Modifier and TypeMethod and Descriptionvoidflush()刷新缓冲输出流。voidwrite(byte[] b, int off, int len)从指定的字节数组写入 len个字节,从偏移 off开始到缓冲的输出流。voidwrite(int b)将指定的字节写入缓冲的输出流。