<pre name="code" class="java">StringBuffer html = new StringBuffer();
InputStream in = new GZIPInputStream(new FileInputStream(file)); Scanner sc=new Scanner(in); while(sc.hasNextLine()){ html.append(sc.nextLine().toString()+"\r\n"); }
原文地址:http://blog.csdn.net/u012516914/article/details/39101603