• 大小: 653KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-19
  • 语言: Java
  • 标签: zip  zip4j  压缩  Java  

资源简介

Java操作zip压缩格式的开源项目,功能强大而且使用方便,能完全满足Java操作Zip压缩文件,官方网址为:http://www.lingala.net/zip4j/
可以下载到jar包、源码和示例,好像没有提供API文档。
不过需要使用代理访问,如果读者嫌麻烦那就从这里下载吧,虽然收取3个CSDN积分,但您评论后一般就可以返还积分了,我也需要积分去下载别人的资源,请谅解!
资源包括:jar包、文档、源码和一些官方示例
该项目的官方说明:
Key features(主要特性):
Create, Add, Extract, Update, Remove files from a Zip file
(针对ZIP压缩文件创建、添加、抽出、更新和移除文件)
Read/Write password protected Zip files
(读写有密码保护的Zip文件)
Supports AES 128/256 Encryption
(支持AES 128/256算法加密)
Supports Standard Zip Encryption
(支持标准Zip算法加密)
Supports Zip64 format
(支持zip64格式)
Supports Store (No Compression) and Deflate compression method
(支持Store(非压缩)和Deflate压缩方法---不太明白)
Create or extract files from Split Zip files (Ex: z01, z02,...zip)
(针对分块zip文件创建和抽出文件)
Supports Unicode file names
(支持Unicode编码文件名)
Progress Monitor
(进度监控)

资源截图

代码片段和文件信息

/*
* Copyright 2010 Srikanth Reddy Lingala  

* Licensed under the Apache License Version 2.0 (the “License“); 
* you may not use this file except in compliance with the License. 
* You may obtain a copy of the License at 

* http://www.apache.org/licenses/LICENSE-2.0 

* Unless required by applicable law or agreed to in writing 
* software distributed under the License is distributed on an “AS IS“ BASIS 
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied. 
* See the License for the specific language governing permissions and 
* limitations under the License. 
*/

package net.lingala.zip4j.examples.extract;

import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;

/**
 * Demonstrates extracting all files from a zip file
 * 
 * @author Srikanth Reddy Lingala
 *
 */
public class ExtractAllFiles {

public ExtractAllFiles() {

try {
// Initiate ZipFile object with the path/name of the zip file.
ZipFile zipFile = new ZipFile(“c:\\ZipTest\\ExtractAllFiles.zip“);

// Extracts all files to the path specified
zipFile.extractAll(“c:\\ZipTest“);

} catch (ZipException e) {
e.printStackTrace();
}

}

/**
 * @param args
 */
public static void main(String[] args) {
new ExtractAllFiles();
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件      130980  2012-07-09 10:58  zip4j_1.3.1.jar
     目录           0  2012-07-09 11:20  zip4j_docs_1.3.1\
     文件        7955  2012-07-09 11:20  zip4j_docs_1.3.1\allclasses-frame.html
     文件        6915  2012-07-09 11:20  zip4j_docs_1.3.1\allclasses-noframe.html
     文件       52739  2012-07-09 11:20  zip4j_docs_1.3.1\constant-values.html
     文件        5164  2012-07-09 11:20  zip4j_docs_1.3.1\deprecated-list.html
     文件        8398  2012-07-09 11:20  zip4j_docs_1.3.1\help-doc.html
     目录           0  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\
     文件       16586  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-1.html
     文件        6899  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-10.html
     文件       10737  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-11.html
     文件        9521  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-12.html
     文件        8486  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-13.html
     文件        8651  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-14.html
     文件       12147  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-15.html
     文件       15150  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-16.html
     文件       64749  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-17.html
     文件        7377  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-18.html
     文件       13072  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-19.html
     文件        8111  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-2.html
     文件        7179  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-20.html
     文件       12359  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-21.html
     文件       17120  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-22.html
     文件       24251  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-3.html
     文件       14417  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-4.html
     文件       20117  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-5.html
     文件       13249  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-6.html
     文件       60521  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-7.html
     文件        7706  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-8.html
     文件       19855  2012-07-09 11:20  zip4j_docs_1.3.1\index-files\index-9.html
     文件        1330  2012-07-09 11:20  zip4j_docs_1.3.1\index.html
............此处省略285个文件信息

评论

共有 条评论