日期:2014-05-20 浏览次数:20661 次
public static void main(String[] args) throws Exception {
DataOutputStream dos = new DataOutputStream(new FileOutputStream("unzip.qq.html"));
int i = 0;
int len = 1024 * 1024;
byte[] buf = new byte[len];
GZIPInputStream gZIPInputStream = new GZIPInputStream(new FileInputStream("qq.com.html.gzip"));
for (i = 0; i < 1000 && (len = gZIPInputStream.read(buf)) != -1; i++) {
dos.write(buf, 0, len);
}
System.out.println("循环次数:" + i);
}