本文整理了Java中net.lingala.zip4j.core.ZipFile.addFiles()
方法的一些代码示例,展示了ZipFile.addFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFile.addFiles()
方法的具体详情如下:
包路径:net.lingala.zip4j.core.ZipFile
类名称:ZipFile
方法名:addFiles
[英]Adds the list of input files to the zip file. If zip file does not exist, then this method creates a new zip file. Parameters such as compression type, etc can be set in the input parameters.
[中]将输入文件列表添加到zip文件。如果zip文件不存在,则此方法将创建一个新的zip文件。可以在输入参数中设置压缩类型等参数。
代码示例来源:origin: net.lingala.zip4j/zip4j
/**
* Adds input source file to the zip file. If zip file does not exist, then
* this method creates a new zip file. Parameters such as compression type, etc
* can be set in the input parameters.
* @param sourceFile - File to tbe added to the zip file
* @param parameters - zip parameters for this file
* @throws ZipException
*/
public void addFile(File sourceFile, ZipParameters parameters) throws ZipException {
ArrayList sourceFileList = new ArrayList();
sourceFileList.add(sourceFile);
addFiles(sourceFileList, parameters);
}
代码示例来源:origin: com.github.axet/zip4j
/**
* Adds input source file to the zip file. If zip file does not exist, then
* this method creates a new zip file. Parameters such as compression type, etc
* can be set in the input parameters.
* @param sourceFile - File to tbe added to the zip file
* @param parameters - zip parameters for this file
* @throws ZipException
*/
public void addFile(File sourceFile, ZipParameters parameters) throws ZipException {
ArrayList sourceFileList = new ArrayList();
sourceFileList.add(sourceFile);
addFiles(sourceFileList, parameters);
}
代码示例来源:origin: SpringCloud/spring-cloud-codegen
ArrayList<File> subFileList = new ArrayList<File>();
Collections.addAll(subFileList, subFiles);
zipFile.addFiles(subFileList, parameters);
代码示例来源:origin: Nepxion/Skeleton
ArrayList<File> subFileList = new ArrayList<File>();
Collections.addAll(subFileList, subFiles);
zipFile.addFiles(subFileList, parameters);
代码示例来源:origin: org.jboss.forge.addon/resources-impl
getZipFile().addFiles(files, parameters);
代码示例来源:origin: net.lingala.zip4j/zip4j
this.zipModel.setSplitArchive(splitArchive);
this.zipModel.setSplitLength(splitLength);
addFiles(sourceFileList, parameters);
代码示例来源:origin: com.github.axet/zip4j
this.zipModel.setSplitArchive(splitArchive);
this.zipModel.setSplitLength(splitLength);
addFiles(sourceFileList, parameters);
内容来源于网络,如有侵权,请联系作者删除!