字节缓冲流
简介
缓冲流是对原原始流进行包装,提高原始流读写数据的性能。提供8KB输入输出缓冲区。
用法
字符缓冲流
8kB(8192)的字符缓冲池,以字符为单位。
方法readLine,读一行
方法newLine,新建一行,也就是换行
原始流、缓冲流的性能分析
使用数组的方法和使用缓冲流来复制文件的效果是差不多的,前提是数组的大小和缓冲桶的大小是一样的。
缓冲流是对原原始流进行包装,提高原始流读写数据的性能。提供8KB输入输出缓冲区。
8kB(8192)的字符缓冲池,以字符为单位。
使用数组的方法和使用缓冲流来复制文件的效果是差不多的,前提是数组的大小和缓冲桶的大小是一样的。