标签:bsp net print 完全 对比 details char detail str
完全引用自: 几种读大文件方法的效率对比测试
据说1.88g只要5秒左右,未亲测.
/** * 读大文件 * BufferedReader + char[] * @throws IOException */ public static void readFile1() throws IOException{ long start = System.currentTimeMillis(); BufferedReader br = new BufferedReader(new FileReader(filePathName)); char[] buff = new char[1024]; int len = -1; while( (len = br.read(buff)) != -1 ){ //System.out.print(new String(buff, 0, len)); } long end = System.currentTimeMillis(); System.out.println("读大文件 BufferedReader + char[], 耗时="+(end-start)); }
标签:bsp net print 完全 对比 details char detail str
原文地址:http://www.cnblogs.com/whatlonelytear/p/7735986.html