- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中net.lingala.zip4j.model.ZipParameters.setCompressionMethod()
方法的一些代码示例,展示了ZipParameters.setCompressionMethod()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipParameters.setCompressionMethod()
方法的具体详情如下:
包路径:net.lingala.zip4j.model.ZipParameters
类名称:ZipParameters
方法名:setCompressionMethod
暂无
代码示例来源:origin: stackoverflow.com
net.lingala.zip4j.core.ZipFile zipFile = new ZipFile("out.zip");
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
zipFile.createZipFileFromFolder("path/to/source/dir", parameters, true, maximum size);
代码示例来源:origin: stackoverflow.com
ZipFile zipfile = new ZipFile("/mnt/sdcard/bla.zip");
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
zipfile.addFolder("/mnt/sdcard/folderToZip", parameters);
代码示例来源:origin: stackoverflow.com
ZipFile _zipFile = new ZipFile(System.nanoTime()+".zip");
ZipParameters _parameters = new ZipParameters();
_parameters.setCompressionMethod(Zip4jConstants.COMP_STORE);
_parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_FASTEST);
_parameters.setIncludeRootFolder(false);
ZipFile zipFile = new ZipFile(System.nanoTime()+".zip");
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_STORE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_FASTEST);
parameters.setIncludeRootFolder(false);
代码示例来源:origin: stackoverflow.com
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
代码示例来源:origin: stackoverflow.com
public void zipFileWithPassword(String fileToZipPath,String password,String zippedFilePath) throws ZipException
{
ZipFile zipFile=new ZipFile(zippedFilePath);
ZipParameters parameters=new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
parameters.setEncryptFiles(true);
parameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_STANDARD);
parameters.setPassword(password);
File fileToZip=new File(fileToZipPath);
log(Severity.INFO,"Creating a ZIP file: %s",fileToZipPath);
zipFile.addFile(fileToZip,parameters);
}
代码示例来源:origin: stackoverflow.com
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
代码示例来源:origin: stackoverflow.com
zipParams.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
zipParams.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
zipParams.setEncryptFiles(true);
代码示例来源:origin: stackoverflow.com
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE); // set compression method to deflate compression
代码示例来源:origin: stackoverflow.com
try {
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
代码示例来源:origin: jclehner/rxdroid
zp.setRootFolderInZip(new File(FILES[i]).getParent());
zp.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
zp.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
代码示例来源:origin: de.alpharogroup/file-worker
parameters.setCompressionMethod(compressionMethod);
代码示例来源:origin: SpringCloud/spring-cloud-codegen
destPath = buildDestinationZipFilePath(srcFile, destPath);
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE); // 压缩方式
代码示例来源:origin: stackoverflow.com
zipParameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
zipParameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_ULTRA);
zipParameters.setEncryptFiles(true);
代码示例来源:origin: Nepxion/Skeleton
destPath = buildDestinationZipFilePath(srcFile, destPath);
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE); // 压缩方式
代码示例来源:origin: com.tomitribe.tribestream/tribestream-container
parameters.setPassword(password);
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
代码示例来源:origin: stackoverflow.com
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE); // set compression method to deflate compression
//DEFLATE_LEVEL_FASTEST - Lowest compression level but higher speed of compression
//DEFLATE_LEVEL_FAST - Low compression level but higher speed of compression
//DEFLATE_LEVEL_NORMAL - Optimal balance between compression level/speed
//DEFLATE_LEVEL_MAXIMUM - High compression level with a compromise of speed
//DEFLATE_LEVEL_ULTRA - Highest compression level but low speed
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
//Set the encryption flag to true
parameters.setEncryptFiles(true);
//Set the encryption method to AES Zip Encryption
parameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_AES);
//AES_STRENGTH_128 - For both encryption and decryption
//AES_STRENGTH_192 - For decryption only
//AES_STRENGTH_256 - For both encryption and decryption
//Key strength 192 cannot be used for encryption. But if a zip file already has a
//file encrypted with key strength of 192, then Zip4j can decrypt this file
parameters.setAesKeyStrength(Zip4jConstants.AES_STRENGTH_256);
代码示例来源:origin: com.jalalkiswani/jk-util
/**
* Compress.
*
* @param fileName
* the file name
* @param compressedFileName
* the compressed file name
* @param password
* the password
*/
public static void compress(String fileName, String compressedFileName, String password) {
try {
ZipParameters zipParameters = new ZipParameters();
zipParameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
zipParameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_ULTRA);
if (password != null) {
zipParameters.setEncryptFiles(true);
zipParameters.setEncryptionMethod(Zip4jConstants.ENC_METHOD_AES);
zipParameters.setAesKeyStrength(Zip4jConstants.AES_STRENGTH_256);
zipParameters.setPassword(password);
}
String destinationZipFilePath = compressedFileName;
ZipFile zipFile = new ZipFile(destinationZipFilePath);
zipFile.addFile(new File(fileName), zipParameters);
} catch (ZipException e) {
JKExceptionUtil.handle(e);
}
}
代码示例来源:origin: MCMrARM/revolution-irc
params.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
params.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
if (password != null) {
代码示例来源:origin: net.lingala.zip4j/zip4j
this.zipParameters.setEncryptFiles(false);
this.zipParameters.setEncryptionMethod(-1);
this.zipParameters.setCompressionMethod(Zip4jConstants.COMP_STORE);
this.zipParameters.setEncryptFiles(false);
this.zipParameters.setEncryptionMethod(-1);
this.zipParameters.setCompressionMethod(Zip4jConstants.COMP_STORE);
代码示例来源:origin: com.github.axet/zip4j
this.zipParameters.setEncryptFiles(false);
this.zipParameters.setEncryptionMethod(-1);
this.zipParameters.setCompressionMethod(Zip4jConstants.COMP_STORE);
this.zipParameters.setEncryptFiles(false);
this.zipParameters.setEncryptionMethod(-1);
this.zipParameters.setCompressionMethod(Zip4jConstants.COMP_STORE);
本文整理了Java中net.lingala.zip4j.core.ZipFile类的一些代码示例,展示了ZipFile类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Ma
本文整理了Java中net.lingala.zip4j.model.ZipParameters类的一些代码示例,展示了ZipParameters类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中net.lingala.zip4j.zip.ZipEngine类的一些代码示例,展示了ZipEngine类的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中net.lingala.zip4j.util.Zip4jUtil类的一些代码示例,展示了Zip4jUtil类的具体用法。这些代码示例主要来源于Github/Stackoverflo
本文整理了Java中net.lingala.zip4j.model.Zip64ExtendedInfo类的一些代码示例,展示了Zip64ExtendedInfo类的具体用法。这些代码示例主要来源于Gi
本文整理了Java中net.lingala.zip4j.model.Zip64EndCentralDirRecord类的一些代码示例,展示了Zip64EndCentralDirRecord类的具体用法
本文整理了Java中net.lingala.zip4j.model.ZipModel类的一些代码示例,展示了ZipModel类的具体用法。这些代码示例主要来源于Github/Stackoverflow
本文整理了Java中net.lingala.zip4j.model.Zip64EndCentralDirLocator类的一些代码示例,展示了Zip64EndCentralDirLocator类的具体
本文整理了Java中net.lingala.zip4j.io.ZipOutputStream类的一些代码示例,展示了ZipOutputStream类的具体用法。这些代码示例主要来源于Github/St
本文整理了Java中net.lingala.zip4j.crypto.engine.ZipCryptoEngine类的一些代码示例,展示了ZipCryptoEngine类的具体用法。这些代码示例主要来
本文整理了Java中net.lingala.zip4j.core.ZipFile.createNewZipModel()方法的一些代码示例,展示了ZipFile.createNewZipModel()
本文整理了Java中net.lingala.zip4j.core.ZipFile.readZipInfo()方法的一些代码示例,展示了ZipFile.readZipInfo()的具体用法。这些代码示例
本文整理了Java中net.lingala.zip4j.core.ZipFile.getFileHeader()方法的一些代码示例,展示了ZipFile.getFileHeader()的具体用法。这些
本文整理了Java中net.lingala.zip4j.core.ZipFile.checkZipModel()方法的一些代码示例,展示了ZipFile.checkZipModel()的具体用法。这些
本文整理了Java中net.lingala.zip4j.core.ZipFile.createZipFile()方法的一些代码示例,展示了ZipFile.createZipFile()的具体用法。这些
本文整理了Java中net.lingala.zip4j.core.ZipFile.getInputStream()方法的一些代码示例,展示了ZipFile.getInputStream()的具体用法。
本文整理了Java中net.lingala.zip4j.core.ZipFile.getComment()方法的一些代码示例,展示了ZipFile.getComment()的具体用法。这些代码示例主要
本文整理了Java中net.lingala.zip4j.core.ZipFile.setRunInThread()方法的一些代码示例,展示了ZipFile.setRunInThread()的具体用法。
本文整理了Java中net.lingala.zip4j.core.ZipFile.setFileNameCharset()方法的一些代码示例,展示了ZipFile.setFileNameCharset
本文整理了Java中net.lingala.zip4j.core.ZipFile.addFile()方法的一些代码示例,展示了ZipFile.addFile()的具体用法。这些代码示例主要来源于Git
我是一名优秀的程序员,十分优秀!