2007-12-12
Java解ZIP压缩文件
try {
// Open the ZIP file
String inFilename = "infile.zip";
ZipInputStream in = new ZipInputStream(new FileInputStream(inFilename));
// Get the first entry
ZipEntry entry = in.getNextEntry();
// Open the output file
String outFilename = "o";
OutputStream out = new FileOutputStream(outFilename);
// Transfer bytes from the ZIP file to the output file
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
// Close the streams
out.close();
in.close();
} catch (IOException e) {
}
发表评论
- 浏览: 54655 次
- 性别:

- 来自: 上海

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
Lucene的评分(score)机制 ...
顶楼主一下。 很早就在做这块的实验了,lucene的score机制更面向与算法数 ...
-- by linliangyi2007 -
Lucene的评分(score)机制 ...
lot1 写道grantbb 写道 在Lucene中score简单说是由 tf ...
-- by imjl -
Lucene的评分(score)机制 ...
我不知道楼上所说的商业应用是指什么呢?据我所知,很多大的互联网公司都在使用Luc ...
-- by grantbb -
Lucene的评分(score)机制 ...
grantbb 写道 在Lucene中score简单说是由 tf * idf * ...
-- by lot1 -
Tomcat5到Tomcat6的升级 ...
能否给出一个具体的链接呢,我在tomcat的网站左侧属性项中还真是没有找到,见笑 ...
-- by aunox






评论排行榜