Uses of Class
net.lingala.zip4j.exception.ZipException
-
-
Uses of ZipException in net.lingala.zip4j
Methods in net.lingala.zip4j that throw ZipException Modifier and Type Method Description void
ZipFile. addFile(java.io.File fileToAdd)
Adds input source file to the zip file with default zip parameters.void
ZipFile. addFile(java.io.File fileToAdd, ZipParameters parameters)
Adds input source file to the zip file.void
ZipFile. addFile(java.lang.String fileToAdd)
Adds input source file to the zip file with default zip parameters.void
ZipFile. addFile(java.lang.String fileToAdd, ZipParameters zipParameters)
Adds input source file to the zip file with provided zip parameters.void
ZipFile. addFiles(java.util.List<java.io.File> filesToAdd)
Adds the list of input files to the zip file with default zip parameters.void
ZipFile. addFiles(java.util.List<java.io.File> filesToAdd, ZipParameters parameters)
Adds the list of input files to the zip file.void
ZipFile. addFolder(java.io.File folderToAdd)
Adds the folder in the given file object to the zip file with default zip parameters.void
ZipFile. addFolder(java.io.File folderToAdd, ZipParameters zipParameters)
Adds the folder in the given file object to the zip file.private void
ZipFile. addFolder(java.io.File folderToAdd, ZipParameters zipParameters, boolean checkSplitArchive)
Internal method to add a folder to the zip file.void
ZipFile. addStream(java.io.InputStream inputStream, ZipParameters parameters)
Creates a new entry in the zip file and adds the content of the input stream to the zip file.void
ZipFile. createSplitZipFile(java.util.List<java.io.File> filesToAdd, ZipParameters parameters, boolean splitArchive, long splitLength)
Creates a zip file and adds the list of source file(s) to the zip file.void
ZipFile. createSplitZipFileFromFolder(java.io.File folderToAdd, ZipParameters parameters, boolean splitArchive, long splitLength)
Creates a zip file and adds the files/folders from the specified folder to the zip file.void
ZipFile. extractAll(java.lang.String destinationPath)
Extracts all the files in the given zip file to the input destination path.void
ZipFile. extractAll(java.lang.String destinationPath, UnzipParameters unzipParameters)
Extracts all entries in the zip file to the destination path considering the options defined in UnzipParametersvoid
ZipFile. extractFile(java.lang.String fileName, java.lang.String destinationPath)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(java.lang.String fileName, java.lang.String destinationPath, java.lang.String newFileName)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(java.lang.String fileName, java.lang.String destinationPath, java.lang.String newFileName, UnzipParameters unzipParameters)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(java.lang.String fileName, java.lang.String destinationPath, UnzipParameters unzipParameters)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(FileHeader fileHeader, java.lang.String destinationPath)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(FileHeader fileHeader, java.lang.String destinationPath, java.lang.String newFileName)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(FileHeader fileHeader, java.lang.String destinationPath, java.lang.String newFileName, UnzipParameters unzipParameters)
Extracts a specific file from the zip file to the destination path.void
ZipFile. extractFile(FileHeader fileHeader, java.lang.String destinationPath, UnzipParameters unzipParameters)
Extracts a specific file from the zip file to the destination path.java.lang.String
ZipFile. getComment()
Returns the comment set for the Zip fileFileHeader
ZipFile. getFileHeader(java.lang.String fileName)
Returns FileHeader if a file header with the given fileHeader string exists in the zip model: If not returns nulljava.util.List<FileHeader>
ZipFile. getFileHeaders()
Returns the list of file headers in the zip file.java.util.List<java.io.File>
ZipFile. getSplitZipFiles()
Returns the full file path+names of all split zip files in an ArrayList.boolean
ZipFile. isEncrypted()
Checks to see if the zip file is encryptedboolean
ZipFile. isSplitArchive()
Checks if the zip file is a split archivevoid
ZipFile. mergeSplitFiles(java.io.File outputZipFile)
Merges split zip files into a single zip file without the need to extract the files in the archiveprivate void
ZipFile. readZipInfo()
Reads the zip header information for this zip file.void
ZipFile. removeFile(java.lang.String fileName)
Removes the file provided in the input parameters from the zip file.void
ZipFile. removeFile(FileHeader fileHeader)
Removes the file provided in the input file header from the zip file.void
ZipFile. removeFiles(java.util.List<java.lang.String> fileNames)
Removes all files from the zip file that match the names in the input list.void
ZipFile. renameFile(java.lang.String fileNameToRename, java.lang.String newFileName)
Renames file name of the entry represented by input fileNameToRename.void
ZipFile. renameFile(FileHeader fileHeader, java.lang.String newFileName)
Renames file name of the entry represented by file header.void
ZipFile. renameFiles(java.util.Map<java.lang.String,java.lang.String> fileNamesMap)
Renames all the entries in the zip file that match the keys in the map to their corresponding values in the map.void
ZipFile. setComment(java.lang.String comment)
Sets comment for the Zip file -
Uses of ZipException in net.lingala.zip4j.crypto
Methods in net.lingala.zip4j.crypto that throw ZipException Modifier and Type Method Description int
AESDecrypter. decryptData(byte[] buff, int start, int len)
int
Decrypter. decryptData(byte[] buff, int start, int len)
int
StandardDecrypter. decryptData(byte[] buff, int start, int len)
static byte[]
AesCipherUtil. derivePasswordBasedKey(byte[] salt, char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword)
Derive Password-Based Key for AES according to AE-1 and AE-2 Specificationsint
AESEncrypter. encryptData(byte[] buff)
int
AESEncrypter. encryptData(byte[] buff, int start, int len)
int
Encrypter. encryptData(byte[] buff)
int
Encrypter. encryptData(byte[] buff, int start, int len)
int
StandardEncrypter. encryptData(byte[] buff)
int
StandardEncrypter. encryptData(byte[] buff, int start, int len)
private byte[]
AESEncrypter. generateSalt(int size)
static AESEngine
AesCipherUtil. getAESEngine(byte[] derivedKey, AesKeyStrength aesKeyStrength)
Get AES Engine using derived key and requested AES Key Strengthprivate void
AESDecrypter. init(byte[] salt, byte[] passwordVerifier, char[] password, AESExtraDataRecord aesExtraDataRecord, boolean useUtf8ForPassword)
private void
AESEncrypter. init(char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword)
private void
StandardDecrypter. init(byte[] headerBytes, char[] password, long lastModifiedFileTime, long crc, boolean useUtf8ForPassword)
private void
StandardEncrypter. init(char[] password, long key, boolean useUtf8ForPassword)
Constructors in net.lingala.zip4j.crypto that throw ZipException Constructor Description AESDecrypter(AESExtraDataRecord aesExtraDataRecord, char[] password, byte[] salt, byte[] passwordVerifier, boolean useUtf8ForPassword)
AESEncrypter(char[] password, AesKeyStrength aesKeyStrength, boolean useUtf8ForPassword)
StandardDecrypter(char[] password, long crc, long lastModifiedFileTime, byte[] headerBytes, boolean useUtf8ForPassword)
StandardEncrypter(char[] password, long key, boolean useUtf8ForPassword)
-
Uses of ZipException in net.lingala.zip4j.crypto.engine
Methods in net.lingala.zip4j.crypto.engine that throw ZipException Modifier and Type Method Description private int[][]
AESEngine. generateWorkingKey(byte[] key)
private void
AESEngine. init(byte[] key)
int
AESEngine. processBlock(byte[] in, byte[] out)
int
AESEngine. processBlock(byte[] in, int inOff, byte[] out, int outOff)
Constructors in net.lingala.zip4j.crypto.engine that throw ZipException Constructor Description AESEngine(byte[] key)
-
Uses of ZipException in net.lingala.zip4j.headers
Methods in net.lingala.zip4j.headers that throw ZipException Modifier and Type Method Description private Zip64EndOfCentralDirectoryRecord
HeaderWriter. buildZip64EndOfCentralDirectoryRecord(ZipModel zipModel, int sizeOfCentralDir, long offsetCentralDir)
private long
HeaderWriter. countNumberOfFileHeaderEntriesOnDisk(java.util.List<FileHeader> fileHeaders, int numOfDisk)
private AESExtraDataRecord
FileHeaderFactory. generateAESExtraDataRecord(ZipParameters parameters)
FileHeader
FileHeaderFactory. generateFileHeader(ZipParameters zipParameters, boolean isSplitZip, int currentDiskNumberStart, java.nio.charset.Charset charset, RawIO rawIO)
static FileHeader
HeaderUtil. getFileHeader(ZipModel zipModel, java.lang.String fileName)
private static FileHeader
HeaderUtil. getFileHeaderWithExactMatch(ZipModel zipModel, java.lang.String fileName)
private AESExtraDataRecord
HeaderReader. readAesExtraDataRecord(java.util.List<ExtraDataRecord> extraDataRecords, RawIO rawIO)
private void
HeaderReader. readAesExtraDataRecord(AbstractFileHeader fileHeader, RawIO rawIO)
private void
HeaderReader. readZip64ExtendedInfo(LocalFileHeader localFileHeader, RawIO rawIO)
private java.lang.String
FileHeaderFactory. validateAndGetFileName(java.lang.String fileNameInZip)
private void
HeaderWriter. writeCentralDirectory(ZipModel zipModel, java.io.ByteArrayOutputStream byteArrayOutputStream, RawIO rawIO, java.nio.charset.Charset charset)
private void
HeaderWriter. writeFileHeader(ZipModel zipModel, FileHeader fileHeader, java.io.ByteArrayOutputStream byteArrayOutputStream, RawIO rawIO, java.nio.charset.Charset charset)
-
Uses of ZipException in net.lingala.zip4j.io.inputstream
Methods in net.lingala.zip4j.io.inputstream that throw ZipException Modifier and Type Method Description private int
ZipInputStream. getAesEncryptionHeaderSize(AESExtraDataRecord aesExtraDataRecord)
private long
ZipInputStream. getCompressedSize(LocalFileHeader localFileHeader)
private int
ZipInputStream. getEncryptionHeaderSize(LocalFileHeader localFileHeader)
private DecompressedInputStream
ZipInputStream. initializeDecompressorForThisEntry(CipherInputStream<?> cipherInputStream, LocalFileHeader localFileHeader)
-
Uses of ZipException in net.lingala.zip4j.io.outputstream
Methods in net.lingala.zip4j.io.outputstream that throw ZipException Modifier and Type Method Description boolean
SplitOutputStream. checkBufferSizeAndStartNextSplitFile(int bufferSize)
Checks if the buffer size is sufficient for the current split file.boolean
CountingOutputStream. checkBuffSizeAndStartNextSplitFile(int bufferSize)
Constructors in net.lingala.zip4j.io.outputstream that throw ZipException Constructor Description SplitOutputStream(java.io.File file)
SplitOutputStream(java.io.File file, long splitLength)
-
Uses of ZipException in net.lingala.zip4j.model.enums
Methods in net.lingala.zip4j.model.enums that throw ZipException Modifier and Type Method Description static CompressionMethod
CompressionMethod. getCompressionMethodFromCode(int code)
Get the CompressionMethod for a given ZIP file codestatic AesVersion
AesVersion. getFromVersionNumber(int versionNumber)
Get the AESVersion instance from an integer AES version number -
Uses of ZipException in net.lingala.zip4j.tasks
Methods in net.lingala.zip4j.tasks that throw ZipException Modifier and Type Method Description protected long
AddFilesToZipTask. calculateTotalWork(AddFilesToZipTask.AddFilesToZipTaskParameters taskParameters)
protected long
AddFolderToZipTask. calculateTotalWork(AddFolderToZipTask.AddFolderToZipTaskParameters taskParameters)
protected abstract long
AsyncZipTask. calculateTotalWork(T taskParameters)
protected long
ExtractFileTask. calculateTotalWork(ExtractFileTask.ExtractFileTaskParameters taskParameters)
(package private) long
AbstractAddFileToZipTask. calculateWorkForFiles(java.util.List<java.io.File> filesToAdd, ZipParameters zipParameters)
private void
AbstractExtractFileTask. checkOutputDirectoryStructure(java.io.File outputFile)
(package private) void
AbstractModifyFileTask. cleanupFile(boolean successFlag, java.io.File zipFile, java.io.File temporaryZipFile)
private java.util.List<java.io.File>
AddFilesToZipTask. determineActualFilesToAdd(AddFilesToZipTask.AddFilesToZipTaskParameters taskParameters)
void
AsyncZipTask. execute(T taskParameters)
private java.util.List<java.lang.String>
RemoveFilesFromZipTask. filterNonExistingEntries(java.util.List<java.lang.String> filesToRemove)
private java.util.Map<java.lang.String,java.lang.String>
RenameFilesTask. filterNonExistingEntriesAndAddSeparatorIfNeeded(java.util.Map<java.lang.String,java.lang.String> inputFileNamesMap)
private java.util.List<FileHeader>
ExtractFileTask. getFileHeadersToExtract(java.lang.String fileNameToExtract)
private java.util.List<java.io.File>
AddFolderToZipTask. getFilesToAdd(AddFolderToZipTask.AddFolderToZipTaskParameters taskParameters)
private int
AbstractModifyFileTask. getIndexOfFileHeader(java.util.List<FileHeader> allFileHeaders, FileHeader fileHeaderForIndex)
private java.lang.String
RenameFilesTask. getNewFileName(java.lang.String newFileName, java.lang.String oldFileName, java.lang.String fileNameFromHeaderToBeChanged)
(package private) long
AbstractModifyFileTask. getOffsetOfNextEntry(java.util.List<FileHeader> sortedFileHeaders, FileHeader fileHeader, ZipModel zipModel)
private void
AsyncZipTask. performTaskWithErrorHandling(T taskParameters, ProgressMonitor progressMonitor)
(package private) void
AbstractAddFileToZipTask. removeFile(FileHeader fileHeader, ProgressMonitor progressMonitor, Zip4jConfig zip4jConfig)
private void
AddStreamToZipTask. removeFileIfExists(ZipModel zipModel, Zip4jConfig zip4jConfig, java.lang.String fileNameInZip, ProgressMonitor progressMonitor)
private java.util.List<java.io.File>
AbstractAddFileToZipTask. removeFilesIfExists(java.util.List<java.io.File> files, ZipParameters zipParameters, ProgressMonitor progressMonitor, Zip4jConfig zip4jConfig)
private void
AbstractModifyFileTask. restoreFileName(java.io.File zipFile, java.io.File temporaryZipFile)
private void
RemoveFilesFromZipTask. updateHeaders(java.util.List<FileHeader> sortedFileHeaders, FileHeader fileHeaderThatWasRemoved, long offsetToSubtract)
private void
RenameFilesTask. updateHeadersInZipModel(java.util.List<FileHeader> sortedFileHeaders, FileHeader fileHeader, java.lang.String newFileName, byte[] newFileNameBytes, int headersOffset)
(package private) void
AbstractModifyFileTask. updateOffsetsForAllSubsequentFileHeaders(java.util.List<FileHeader> sortedFileHeaders, ZipModel zipModel, FileHeader fileHeaderModified, long offsetToAdd)
protected void
AsyncZipTask. verifyIfTaskIsCancelled()
(package private) void
AbstractAddFileToZipTask. verifyZipParameters(ZipParameters parameters)
-
Uses of ZipException in net.lingala.zip4j.util
Methods in net.lingala.zip4j.util that throw ZipException Modifier and Type Method Description private static void
FileUtils. assertFileExists(java.io.File file)
static void
FileUtils. assertFilesExist(java.util.List<java.io.File> files, ZipParameters.SymbolicLinkAction symLinkAction)
private static void
FileUtils. assertSymbolicLinkTargetExists(java.io.File file)
static void
FileUtils. copyFile(java.io.RandomAccessFile randomAccessFile, java.io.OutputStream outputStream, long start, long end, ProgressMonitor progressMonitor, int bufferSize)
static boolean
Zip4jUtil. createDirectoryIfNotExists(java.io.File file)
static CompressionMethod
Zip4jUtil. getCompressionMethod(AbstractFileHeader localFileHeader)
static java.util.List<java.io.File>
FileUtils. getFilesInDirectoryRecursive(java.io.File path, ZipParameters zipParameters)
static java.lang.String
FileUtils. getRelativeFileName(java.io.File fileToAdd, ZipParameters zipParameters)
static java.util.List<java.io.File>
FileUtils. getSplitZipFiles(ZipModel zipModel)
static java.lang.String
FileUtils. getZipFileNameWithoutExtension(java.lang.String zipFile)
-