Chinaunix首页 | 论坛 | 博客
  • 博客访问: 562412
  • 博文数量: 165
  • 博客积分: 3897
  • 博客等级: 中校
  • 技术积分: 1799
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-19 14:09
个人简介

英文名Coroel,读音类似“珊瑚”coral,你懂的!不懂的查海词,还有个类似读音的,CorelDraw画图软件。。。

文章分类

全部博文(165)

文章存档

2014年(1)

2012年(7)

2011年(12)

2010年(33)

2009年(19)

2008年(10)

2007年(51)

2005年(32)

分类: LINUX

2014-03-27 11:52:15

英文名Coroel,读音类似“珊瑚”coral,你懂的!不懂的查海词,还有个类似读音的,CorelDraw画图软件。。。

 

Commons Compress 用以实现将文件压缩或解压成 tarzipbzip2 等格式。

下面代码将文件压缩成zip格式:

Archive archiver = ArchiverFactory.getInstance("zip");               

archiver.add(   new File("C:\Temp\1.html"));              

archiver.add(   new File("C:\Temp\1.html.bz2"));              

archiver.save(  new File("C:\Temp\ZIPTEST.zip"));

Zip文件的解压缩:

Archive archiver = ArchiverFactory.getInstance(                                

new File("C:\Temp\ZIPTEST.zip"));              

archiver.unpack( new File("C:\Temp\unpacked\"));

The Apache Commons Compress library defines an API for working with ar, cpio, Unix dump, tar, zip, gzip, Pack200 and bzip2 files.

The code in this component has many origins:

The bzip2, tar and zip support came from Avalon s Excalibur, but originally from Ant, as far as life in Apache goes. The tar package is originally Tim Endres  public domain package. The bzip2 package is based on the work done by Keiron Liddle. It has migrated via:

Ant -> Avalon-Excalibur -> Commons-IO -> Commons-Compress.

阅读(1090) | 评论(0) | 转发(0) |
0

上一篇:修改Windows 8中文输入法切换方式

下一篇:没有了

给主人留下些什么吧!~~