diff --git a/README.md b/README.md index b6029f61..2ddd1c07 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ directly from the osu! program folder. Otherwise, place songs in the generated `Songs` folder or set the `BeatmapDirectory` value in the generated configuration file to the path of the root song directory. +Note that beatmaps are typically delivered as OSZ files. These can be extracted +with any ZIP tool, and opsu! will automatically extract them into the songs +folder if placed in the root directory. + ### First Run The `Music Offset` value will likely need to be adjusted when playing for the first time, or whenever hit objects are out of sync with the music. This and diff --git a/lib/zip4j/classes/net/lingala/zip4j/core/HeaderReader.class b/lib/zip4j/classes/net/lingala/zip4j/core/HeaderReader.class new file mode 100644 index 00000000..9fb93ae2 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/core/HeaderReader.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/core/HeaderWriter.class b/lib/zip4j/classes/net/lingala/zip4j/core/HeaderWriter.class new file mode 100644 index 00000000..79f17dbf Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/core/HeaderWriter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/core/ZipFile.class b/lib/zip4j/classes/net/lingala/zip4j/core/ZipFile.class new file mode 100644 index 00000000..6c2ac388 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/core/ZipFile.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/AESDecrypter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/AESDecrypter.class new file mode 100644 index 00000000..b410290a Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/AESDecrypter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/AESEncrpyter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/AESEncrpyter.class new file mode 100644 index 00000000..073549d6 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/AESEncrpyter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/IDecrypter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/IDecrypter.class new file mode 100644 index 00000000..9a4773b6 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/IDecrypter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/IEncrypter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/IEncrypter.class new file mode 100644 index 00000000..35c419ee Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/IEncrypter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/BinTools.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/BinTools.class new file mode 100644 index 00000000..43f6deea Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/BinTools.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.class new file mode 100644 index 00000000..93fd5e34 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2Engine.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2Engine.class new file mode 100644 index 00000000..c8318236 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2Engine.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2HexFormatter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2HexFormatter.class new file mode 100644 index 00000000..1c4b7683 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2HexFormatter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2Parameters.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2Parameters.class new file mode 100644 index 00000000..18e792bc Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PBKDF2Parameters.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PRF.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PRF.class new file mode 100644 index 00000000..0c771730 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/PBKDF2/PRF.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/StandardDecrypter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/StandardDecrypter.class new file mode 100644 index 00000000..871dd081 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/StandardDecrypter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/StandardEncrypter.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/StandardEncrypter.class new file mode 100644 index 00000000..ccb2f575 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/StandardEncrypter.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/engine/AESEngine.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/engine/AESEngine.class new file mode 100644 index 00000000..10e40c57 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/engine/AESEngine.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/crypto/engine/ZipCryptoEngine.class b/lib/zip4j/classes/net/lingala/zip4j/crypto/engine/ZipCryptoEngine.class new file mode 100644 index 00000000..fbf91c20 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/crypto/engine/ZipCryptoEngine.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/exception/ZipException.class b/lib/zip4j/classes/net/lingala/zip4j/exception/ZipException.class new file mode 100644 index 00000000..491ea127 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/exception/ZipException.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/exception/ZipExceptionConstants.class b/lib/zip4j/classes/net/lingala/zip4j/exception/ZipExceptionConstants.class new file mode 100644 index 00000000..a5048c8f Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/exception/ZipExceptionConstants.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/BaseInputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/BaseInputStream.class new file mode 100644 index 00000000..dcbee645 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/BaseInputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/BaseOutputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/BaseOutputStream.class new file mode 100644 index 00000000..b1e024fb Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/BaseOutputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/CipherOutputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/CipherOutputStream.class new file mode 100644 index 00000000..d4d5f335 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/CipherOutputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/DeflaterOutputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/DeflaterOutputStream.class new file mode 100644 index 00000000..31ba521b Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/DeflaterOutputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/InflaterInputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/InflaterInputStream.class new file mode 100644 index 00000000..0927bcaa Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/InflaterInputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/PartInputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/PartInputStream.class new file mode 100644 index 00000000..54fb62d6 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/PartInputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/SplitOutputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/SplitOutputStream.class new file mode 100644 index 00000000..77bc807c Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/SplitOutputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/ZipInputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/ZipInputStream.class new file mode 100644 index 00000000..95147bb9 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/ZipInputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/io/ZipOutputStream.class b/lib/zip4j/classes/net/lingala/zip4j/io/ZipOutputStream.class new file mode 100644 index 00000000..296ec136 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/io/ZipOutputStream.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/AESExtraDataRecord.class b/lib/zip4j/classes/net/lingala/zip4j/model/AESExtraDataRecord.class new file mode 100644 index 00000000..ffcf4a21 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/AESExtraDataRecord.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/ArchiveExtraDataRecord.class b/lib/zip4j/classes/net/lingala/zip4j/model/ArchiveExtraDataRecord.class new file mode 100644 index 00000000..b831e33c Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/ArchiveExtraDataRecord.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/CentralDirectory.class b/lib/zip4j/classes/net/lingala/zip4j/model/CentralDirectory.class new file mode 100644 index 00000000..0351631d Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/CentralDirectory.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/DataDescriptor.class b/lib/zip4j/classes/net/lingala/zip4j/model/DataDescriptor.class new file mode 100644 index 00000000..bc6eabdf Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/DataDescriptor.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/DigitalSignature.class b/lib/zip4j/classes/net/lingala/zip4j/model/DigitalSignature.class new file mode 100644 index 00000000..20861e41 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/DigitalSignature.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/EndCentralDirRecord.class b/lib/zip4j/classes/net/lingala/zip4j/model/EndCentralDirRecord.class new file mode 100644 index 00000000..d1411a1e Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/EndCentralDirRecord.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/ExtraDataRecord.class b/lib/zip4j/classes/net/lingala/zip4j/model/ExtraDataRecord.class new file mode 100644 index 00000000..083c1cc1 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/ExtraDataRecord.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/FileHeader.class b/lib/zip4j/classes/net/lingala/zip4j/model/FileHeader.class new file mode 100644 index 00000000..52d439b5 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/FileHeader.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/LocalFileHeader.class b/lib/zip4j/classes/net/lingala/zip4j/model/LocalFileHeader.class new file mode 100644 index 00000000..b309498e Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/LocalFileHeader.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/UnzipEngineParameters.class b/lib/zip4j/classes/net/lingala/zip4j/model/UnzipEngineParameters.class new file mode 100644 index 00000000..3d0ef314 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/UnzipEngineParameters.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/UnzipParameters.class b/lib/zip4j/classes/net/lingala/zip4j/model/UnzipParameters.class new file mode 100644 index 00000000..e9d972b4 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/UnzipParameters.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/Zip64EndCentralDirLocator.class b/lib/zip4j/classes/net/lingala/zip4j/model/Zip64EndCentralDirLocator.class new file mode 100644 index 00000000..e25bae44 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/Zip64EndCentralDirLocator.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/Zip64EndCentralDirRecord.class b/lib/zip4j/classes/net/lingala/zip4j/model/Zip64EndCentralDirRecord.class new file mode 100644 index 00000000..6db105cb Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/Zip64EndCentralDirRecord.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/Zip64ExtendedInfo.class b/lib/zip4j/classes/net/lingala/zip4j/model/Zip64ExtendedInfo.class new file mode 100644 index 00000000..73f56333 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/Zip64ExtendedInfo.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/ZipModel.class b/lib/zip4j/classes/net/lingala/zip4j/model/ZipModel.class new file mode 100644 index 00000000..9084fca2 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/ZipModel.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/model/ZipParameters.class b/lib/zip4j/classes/net/lingala/zip4j/model/ZipParameters.class new file mode 100644 index 00000000..291415d9 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/model/ZipParameters.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/progress/ProgressMonitor.class b/lib/zip4j/classes/net/lingala/zip4j/progress/ProgressMonitor.class new file mode 100644 index 00000000..aa34c27a Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/progress/ProgressMonitor.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip$1.class b/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip$1.class new file mode 100644 index 00000000..b23d7431 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip$1.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip$2.class b/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip$2.class new file mode 100644 index 00000000..e0861b64 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip$2.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip.class b/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip.class new file mode 100644 index 00000000..6d4e99c5 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/unzip/Unzip.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/unzip/UnzipEngine.class b/lib/zip4j/classes/net/lingala/zip4j/unzip/UnzipEngine.class new file mode 100644 index 00000000..b12f75d2 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/unzip/UnzipEngine.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/unzip/UnzipUtil.class b/lib/zip4j/classes/net/lingala/zip4j/unzip/UnzipUtil.class new file mode 100644 index 00000000..8b929064 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/unzip/UnzipUtil.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer$1.class b/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer$1.class new file mode 100644 index 00000000..36422a0e Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer$1.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer$2.class b/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer$2.class new file mode 100644 index 00000000..16bcaa7b Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer$2.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer.class b/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer.class new file mode 100644 index 00000000..6d47dcc6 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/ArchiveMaintainer.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/CRCUtil.class b/lib/zip4j/classes/net/lingala/zip4j/util/CRCUtil.class new file mode 100644 index 00000000..30f1c1bb Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/CRCUtil.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/InternalZipConstants.class b/lib/zip4j/classes/net/lingala/zip4j/util/InternalZipConstants.class new file mode 100644 index 00000000..9e62dfdd Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/InternalZipConstants.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/Raw.class b/lib/zip4j/classes/net/lingala/zip4j/util/Raw.class new file mode 100644 index 00000000..e111c130 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/Raw.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/Zip4jConstants.class b/lib/zip4j/classes/net/lingala/zip4j/util/Zip4jConstants.class new file mode 100644 index 00000000..70a7def4 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/Zip4jConstants.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/util/Zip4jUtil.class b/lib/zip4j/classes/net/lingala/zip4j/util/Zip4jUtil.class new file mode 100644 index 00000000..f5a2ed61 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/util/Zip4jUtil.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/zip/ZipEngine$1.class b/lib/zip4j/classes/net/lingala/zip4j/zip/ZipEngine$1.class new file mode 100644 index 00000000..1bad3967 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/zip/ZipEngine$1.class differ diff --git a/lib/zip4j/classes/net/lingala/zip4j/zip/ZipEngine.class b/lib/zip4j/classes/net/lingala/zip4j/zip/ZipEngine.class new file mode 100644 index 00000000..cc2eb0b8 Binary files /dev/null and b/lib/zip4j/classes/net/lingala/zip4j/zip/ZipEngine.class differ diff --git a/lib/zip4j/javadoc/allclasses-frame.html b/lib/zip4j/javadoc/allclasses-frame.html new file mode 100644 index 00000000..deeede0d --- /dev/null +++ b/lib/zip4j/javadoc/allclasses-frame.html @@ -0,0 +1,134 @@ + + + +
+ + +AESDecrypter
+ +AESEncrpyter + +AESEngine + +AESExtraDataRecord + +ArchiveExtraDataRecord + +ArchiveMaintainer + +BaseInputStream + +BaseOutputStream + +CentralDirectory + +CipherOutputStream + +CRCUtil + +DataDescriptor + +DeflaterOutputStream + +DigitalSignature + +EndCentralDirRecord + +ExtraDataRecord + +FileHeader + +HeaderReader + +HeaderWriter + +IDecrypter + +IEncrypter + +InflaterInputStream + +InternalZipConstants + +LocalFileHeader + +MacBasedPRF + +PartInputStream + +PBKDF2Engine + +PBKDF2Parameters + +ProgressMonitor + +Raw + +SplitOutputStream + +StandardDecrypter + +StandardEncrypter + +Unzip + +UnzipEngine + +UnzipEngineParameters + +UnzipParameters + +UnzipUtil + +Zip4jConstants + +Zip4jUtil + +Zip64EndCentralDirLocator + +Zip64EndCentralDirRecord + +Zip64ExtendedInfo + +ZipCryptoEngine + +ZipEngine + +ZipException + +ZipExceptionConstants + +ZipFile + +ZipInputStream + +ZipModel + +ZipOutputStream + +ZipParameters + + |
+
AESDecrypter
+ +AESEncrpyter + +AESEngine + +AESExtraDataRecord + +ArchiveExtraDataRecord + +ArchiveMaintainer + +BaseInputStream + +BaseOutputStream + +CentralDirectory + +CipherOutputStream + +CRCUtil + +DataDescriptor + +DeflaterOutputStream + +DigitalSignature + +EndCentralDirRecord + +ExtraDataRecord + +FileHeader + +HeaderReader + +HeaderWriter + +IDecrypter + +IEncrypter + +InflaterInputStream + +InternalZipConstants + +LocalFileHeader + +MacBasedPRF + +PartInputStream + +PBKDF2Engine + +PBKDF2Parameters + +ProgressMonitor + +Raw + +SplitOutputStream + +StandardDecrypter + +StandardEncrypter + +Unzip + +UnzipEngine + +UnzipEngineParameters + +UnzipParameters + +UnzipUtil + +Zip4jConstants + +Zip4jUtil + +Zip64EndCentralDirLocator + +Zip64EndCentralDirRecord + +Zip64ExtendedInfo + +ZipCryptoEngine + +ZipEngine + +ZipException + +ZipExceptionConstants + +ZipFile + +ZipInputStream + +ZipModel + +ZipOutputStream + +ZipParameters + + |
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+net.lingala.* | +
---|
+ +
net.lingala.zip4j.exception.ZipExceptionConstants | +||
---|---|---|
+public static final int |
+constuctorFileNotFoundException |
+2 |
+
+public static final int |
+inputZipParamIsNull |
+1 |
+
+public static final int |
+notZipFile |
+4 |
+
+public static final int |
+randomAccessFileNull |
+3 |
+
+public static final int |
+WRONG_PASSWORD |
+5 |
+
+ +
+ +
net.lingala.zip4j.progress.ProgressMonitor | +||
---|---|---|
+public static final int |
+OPERATION_ADD |
+0 |
+
+public static final int |
+OPERATION_CALC_CRC |
+3 |
+
+public static final int |
+OPERATION_EXTRACT |
+1 |
+
+public static final int |
+OPERATION_MERGE |
+4 |
+
+public static final int |
+OPERATION_NONE |
+-1 |
+
+public static final int |
+OPERATION_REMOVE |
+2 |
+
+public static final int |
+RESULT_CANCELLED |
+3 |
+
+public static final int |
+RESULT_ERROR |
+2 |
+
+public static final int |
+RESULT_SUCCESS |
+0 |
+
+public static final int |
+RESULT_WORKING |
+1 |
+
+public static final int |
+STATE_BUSY |
+1 |
+
+public static final int |
+STATE_READY |
+0 |
+
+ +
+ +
net.lingala.zip4j.util.InternalZipConstants | +||
---|---|---|
+public static final int |
+AES_AUTH_LENGTH |
+10 |
+
+public static final int |
+AES_BLOCK_SIZE |
+16 |
+
+public static final int |
+AESSIG |
+39169 |
+
+public static final long |
+ARCEXTDATREC |
+134630224L |
+
+public static final int |
+BUFF_SIZE |
+4096 |
+
+public static final int |
+CENATT |
+36 |
+
+public static final int |
+CENATX |
+38 |
+
+public static final int |
+CENCOM |
+32 |
+
+public static final int |
+CENCRC |
+16 |
+
+public static final int |
+CENDSK |
+34 |
+
+public static final int |
+CENEXT |
+30 |
+
+public static final int |
+CENFLG |
+8 |
+
+public static final int |
+CENHDR |
+46 |
+
+public static final int |
+CENHOW |
+10 |
+
+public static final int |
+CENLEN |
+24 |
+
+public static final int |
+CENNAM |
+28 |
+
+public static final int |
+CENOFF |
+42 |
+
+public static final long |
+CENSIG |
+33639248L |
+
+public static final int |
+CENSIZ |
+20 |
+
+public static final int |
+CENTIM |
+12 |
+
+public static final int |
+CENVEM |
+4 |
+
+public static final int |
+CENVER |
+6 |
+
+public static final String |
+CHARSET_COMMENTS_DEFAULT |
+"windows-1254" |
+
+public static final String |
+CHARSET_CP850 |
+"Cp850" |
+
+public static final String |
+CHARSET_UTF8 |
+"UTF8" |
+
+public static final long |
+DIGSIG |
+84233040L |
+
+public static final int |
+ENDCOM |
+20 |
+
+public static final int |
+ENDHDR |
+22 |
+
+public static final int |
+ENDOFF |
+16 |
+
+public static final long |
+ENDSIG |
+101010256L |
+
+public static final int |
+ENDSIZ |
+12 |
+
+public static final int |
+ENDSUB |
+8 |
+
+public static final int |
+ENDTOT |
+10 |
+
+public static final int |
+EXTCRC |
+4 |
+
+public static final int |
+EXTHDR |
+16 |
+
+public static final int |
+EXTLEN |
+12 |
+
+public static final int |
+EXTRAFIELDZIP64LENGTH |
+1 |
+
+public static final long |
+EXTSIG |
+134695760L |
+
+public static final int |
+EXTSIZ |
+8 |
+
+public static final int |
+FILE_MODE_ARCHIVE |
+32 |
+
+public static final int |
+FILE_MODE_HIDDEN |
+2 |
+
+public static final int |
+FILE_MODE_HIDDEN_ARCHIVE |
+34 |
+
+public static final int |
+FILE_MODE_NONE |
+0 |
+
+public static final int |
+FILE_MODE_READ_ONLY |
+1 |
+
+public static final int |
+FILE_MODE_READ_ONLY_ARCHIVE |
+33 |
+
+public static final int |
+FILE_MODE_READ_ONLY_HIDDEN |
+3 |
+
+public static final int |
+FILE_MODE_READ_ONLY_HIDDEN_ARCHIVE |
+35 |
+
+public static final int |
+FILE_MODE_SYSTEM |
+38 |
+
+public static final int |
+FOLDER_MODE_ARCHIVE |
+48 |
+
+public static final int |
+FOLDER_MODE_HIDDEN |
+18 |
+
+public static final int |
+FOLDER_MODE_HIDDEN_ARCHIVE |
+50 |
+
+public static final int |
+FOLDER_MODE_NONE |
+16 |
+
+public static final int |
+LIST_TYPE_FILE |
+1 |
+
+public static final int |
+LIST_TYPE_STRING |
+2 |
+
+public static final int |
+LOCCRC |
+14 |
+
+public static final int |
+LOCEXT |
+28 |
+
+public static final int |
+LOCFLG |
+6 |
+
+public static final int |
+LOCHDR |
+30 |
+
+public static final int |
+LOCHOW |
+8 |
+
+public static final int |
+LOCLEN |
+22 |
+
+public static final int |
+LOCNAM |
+26 |
+
+public static final long |
+LOCSIG |
+67324752L |
+
+public static final int |
+LOCSIZ |
+18 |
+
+public static final int |
+LOCTIM |
+10 |
+
+public static final int |
+LOCVER |
+4 |
+
+public static final int |
+MAX_ALLOWED_ZIP_COMMENT_LENGTH |
+65535 |
+
+public static final int |
+MIN_SPLIT_LENGTH |
+65536 |
+
+public static final int |
+MODE_UNZIP |
+2 |
+
+public static final int |
+MODE_ZIP |
+1 |
+
+public static final String |
+OFFSET_CENTRAL_DIR |
+"offsetCentralDir" |
+
+public static final String |
+READ_MODE |
+"r" |
+
+public static final long |
+SPLITSIG |
+134695760L |
+
+public static final int |
+STD_DEC_HDR_SIZE |
+12 |
+
+public static final String |
+THREAD_NAME |
+"Zip4j" |
+
+public static final int |
+UFT8_NAMES_FLAG |
+2048 |
+
+public static final int |
+UPDATE_LFH_COMP_SIZE |
+18 |
+
+public static final int |
+UPDATE_LFH_CRC |
+14 |
+
+public static final int |
+UPDATE_LFH_UNCOMP_SIZE |
+22 |
+
+public static final String |
+VERSION |
+"1.3.1" |
+
+public static final String |
+WRITE_MODE |
+"rw" |
+
+public static final long |
+ZIP_64_LIMIT |
+4294967295L |
+
+public static final String |
+ZIP_FILE_SEPARATOR |
+"/" |
+
+public static final long |
+ZIP64ENDCENDIRLOC |
+117853008L |
+
+public static final long |
+ZIP64ENDCENDIRREC |
+101075792L |
+
+ +
+ +
net.lingala.zip4j.util.Zip4jConstants | +||
---|---|---|
+public static final int |
+AES_STRENGTH_128 |
+1 |
+
+public static final int |
+AES_STRENGTH_192 |
+2 |
+
+public static final int |
+AES_STRENGTH_256 |
+3 |
+
+public static final int |
+COMP_AES_ENC |
+99 |
+
+public static final int |
+COMP_DEFLATE |
+8 |
+
+public static final int |
+COMP_STORE |
+0 |
+
+public static final int |
+DEFLATE_LEVEL_FAST |
+3 |
+
+public static final int |
+DEFLATE_LEVEL_FASTEST |
+1 |
+
+public static final int |
+DEFLATE_LEVEL_MAXIMUM |
+7 |
+
+public static final int |
+DEFLATE_LEVEL_NORMAL |
+5 |
+
+public static final int |
+DEFLATE_LEVEL_ULTRA |
+9 |
+
+public static final int |
+ENC_METHOD_AES |
+99 |
+
+public static final int |
+ENC_METHOD_STANDARD |
+0 |
+
+public static final int |
+ENC_NO_ENCRYPTION |
+-1 |
+
+ +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+ +++The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+ +++Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
+
+- Interfaces (italic)
- Classes
- Enums
- Exceptions
- Errors
- Annotation Types
+ ++ ++Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.- Class inheritance diagram
- Direct Subclasses
- All Known Subinterfaces
- All Known Implementing Classes
- Class/interface declaration
- Class/interface description +
+
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary +
+
- Field Detail
- Constructor Detail
- Method Detail
+ ++ ++Each annotation type has its own separate page with the following sections:
+
+- Annotation Type declaration
- Annotation Type description
- Required Element Summary
- Optional Element Summary
- Element Detail
+ +++Each enum has its own separate page with the following sections:
+
+- Enum declaration
- Enum description
- Enum Constant Summary
- Enum Constant Detail
+Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.+
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with+java.lang.Object
. The interfaces do not inherit fromjava.lang.Object
.+
+- When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
- When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.+
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.+
+
+
+
+
+This help file applies to API documentation generated using the standard doclet.
+
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.core.HeaderReader ++
public class HeaderReader
+Helper class to read header information for the zip file +
+ +
+
+Constructor Summary | +|
---|---|
HeaderReader(RandomAccessFile zip4jRaf)
+
++ Creates a new HeaderReader object with the given input stream |
+
+Method Summary | +|
---|---|
+ ZipModel |
+readAllHeaders()
+
++ Reads all the header information for the zip file. |
+
+ ZipModel |
+readAllHeaders(String fileNameCharset)
+
++ Reads all the header information for the zip file. |
+
+ LocalFileHeader |
+readLocalFileHeader(FileHeader fileHeader)
+
++ Reads local file header for the given file header |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public HeaderReader(RandomAccessFile zip4jRaf)+
+
zip4jRaf
- +Method Detail | +
---|
+public ZipModel readAllHeaders() + throws ZipException+
+
ZipModel
+ZipException
+public ZipModel readAllHeaders(String fileNameCharset) + throws ZipException+
+
ZipModel
+ZipException
+public LocalFileHeader readLocalFileHeader(FileHeader fileHeader) + throws ZipException+
+
fileHeader
-
+LocalFileHeader
+ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.core.HeaderWriter ++
public class HeaderWriter
+
+Constructor Summary | +|
---|---|
HeaderWriter()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+finalizeZipFile(ZipModel zipModel,
+ OutputStream outputStream)
+
++ Processes zip header data and writes this data to the zip file |
+
+ void |
+finalizeZipFileWithoutValidations(ZipModel zipModel,
+ OutputStream outputStream)
+
++ Processes zip header data and writes this data to the zip file without any validations. |
+
+ void |
+updateLocalFileHeader(LocalFileHeader localFileHeader,
+ long offset,
+ int toUpdate,
+ ZipModel zipModel,
+ byte[] bytesToWrite,
+ int noOfDisk,
+ SplitOutputStream outputStream)
+
++ |
+
+ int |
+writeExtendedLocalHeader(LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
+ int |
+writeLocalFileHeader(ZipModel zipModel,
+ LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public HeaderWriter()+
+Method Detail | +
---|
+public int writeLocalFileHeader(ZipModel zipModel, + LocalFileHeader localFileHeader, + OutputStream outputStream) + throws ZipException+
ZipException
+public int writeExtendedLocalHeader(LocalFileHeader localFileHeader, + OutputStream outputStream) + throws ZipException, + IOException+
ZipException
+IOException
+public void finalizeZipFile(ZipModel zipModel, + OutputStream outputStream) + throws ZipException+
+
zipModel
- outputStream
-
+ZipException
+public void finalizeZipFileWithoutValidations(ZipModel zipModel, + OutputStream outputStream) + throws ZipException+
+
zipModel
- outputStream
-
+ZipException
+public void updateLocalFileHeader(LocalFileHeader localFileHeader, + long offset, + int toUpdate, + ZipModel zipModel, + byte[] bytesToWrite, + int noOfDisk, + SplitOutputStream outputStream) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.core.ZipFile ++
public class ZipFile
+Base class to handle zip files. Some of the operations supported
+ in this class are:
+
+ +
+
+Constructor Summary | +|
---|---|
ZipFile(File zipFile)
+
++ Creates a new Zip File Object with the input file. |
+|
ZipFile(String zipFile)
+
++ Creates a new Zip File Object with the given zip file path. |
+
+Method Summary | +|
---|---|
+ void |
+addFile(File sourceFile,
+ ZipParameters parameters)
+
++ Adds input source file to the zip file. |
+
+ void |
+addFiles(ArrayList sourceFileList,
+ ZipParameters parameters)
+
++ Adds the list of input files to the zip file. |
+
+ void |
+addFolder(File path,
+ ZipParameters parameters)
+
++ Adds the folder in the given file object to the zip file. |
+
+ void |
+addFolder(String path,
+ ZipParameters parameters)
+
++ Adds the folder in the given path to the zip file. |
+
+ void |
+addStream(InputStream inputStream,
+ ZipParameters parameters)
+
++ Creates a new entry in the zip file and adds the content of the inputstream to the + zip file. |
+
+ void |
+createZipFile(ArrayList sourceFileList,
+ ZipParameters parameters)
+
++ Creates a zip file and adds the list of source file(s) to the zip file. |
+
+ void |
+createZipFile(ArrayList sourceFileList,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the list of source file(s) to the zip file. |
+
+ void |
+createZipFile(File sourceFile,
+ ZipParameters parameters)
+
++ Creates a zip file and adds the source file to the zip file. |
+
+ void |
+createZipFile(File sourceFile,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the source file to the zip file. |
+
+ void |
+createZipFileFromFolder(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 |
+createZipFileFromFolder(String 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 |
+extractAll(String destPath)
+
++ Extracts all the files in the given zip file to the input destination path. |
+
+ void |
+extractAll(String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts all the files in the given zip file to the input destination path. |
+
+ void |
+extractFile(FileHeader fileHeader,
+ String destPath)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+extractFile(String fileName,
+ String destPath)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+extractFile(String fileName,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+extractFile(String fileName,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ String |
+getComment()
+
++ Returns the comment set for the Zip file |
+
+ String |
+getComment(String encoding)
+
++ Returns the comment set for the Zip file in the input encoding |
+
+ File |
+getFile()
+
++ Returns the File object of the zip file |
+
+ FileHeader |
+getFileHeader(String fileName)
+
++ Returns FileHeader if a file header with the given fileHeader + string exists in the zip model: If not returns null |
+
+ List |
+getFileHeaders()
+
++ Returns the list of file headers in the zip file. |
+
+ ZipInputStream |
+getInputStream(FileHeader fileHeader)
+
++ Returns an input stream for reading the contents of the Zip file corresponding + to the input FileHeader. |
+
+ ProgressMonitor |
+getProgressMonitor()
+
++ |
+
+ ArrayList |
+getSplitZipFiles()
+
++ Returns the full file path+names of all split zip files + in an ArrayList. |
+
+ boolean |
+isEncrypted()
+
++ Checks to see if the zip file is encrypted |
+
+ boolean |
+isRunInThread()
+
++ |
+
+ boolean |
+isSplitArchive()
+
++ Checks if the zip file is a split archive |
+
+ boolean |
+isValidZipFile()
+
++ Checks to see if the input zip file is a valid zip file. |
+
+ void |
+mergeSplitFiles(File outputZipFile)
+
++ Merges split zip files into a single zip file without the need to extract the + files in the archive |
+
+ void |
+removeFile(FileHeader fileHeader)
+
++ Removes the file provided in the input file header from the zip file. |
+
+ void |
+removeFile(String fileName)
+
++ Removes the file provided in the input paramters from the zip file. |
+
+ void |
+setComment(String comment)
+
++ Sets comment for the Zip file |
+
+ void |
+setFileNameCharset(String charsetName)
+
++ Zip4j will encode all the file names with the input charset. |
+
+ void |
+setPassword(char[] password)
+
++ Sets the password for the zip file |
+
+ void |
+setPassword(String password)
+
++ Sets the password for the zip file. + Note: For security reasons, usage of this method is discouraged. |
+
+ void |
+setRunInThread(boolean runInThread)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipFile(String zipFile) + throws ZipException+
+
zipFile
-
+ZipException
+public ZipFile(File zipFile) + throws ZipException+
+
zipFile
-
+ZipException
+Method Detail | +
---|
+public void createZipFile(File sourceFile, + ZipParameters parameters) + throws ZipException+
+
sourceFile
- - File to be added to the zip fileparameters
- - parameters to create the zip file
+ZipException
+public void createZipFile(File sourceFile, + ZipParameters parameters, + boolean splitArchive, + long splitLength) + throws ZipException+
+
sourceFile
- - File to be added to the zip fileparameters
- - parameters to create the zip filesplitArchive
- - if archive has to be split or notsplitLength
- - if archive has to be split, then length in bytes at which it has to be split
+ZipException
+public void createZipFile(ArrayList sourceFileList, + ZipParameters parameters) + throws ZipException+
+
sourceFileList
- - File to be added to the zip fileparameters
- - parameters to create the zip file
+ZipException
+public void createZipFile(ArrayList sourceFileList, + ZipParameters parameters, + boolean splitArchive, + long splitLength) + throws ZipException+
+
sourceFileList
- - File to be added to the zip fileparameters
- - zip parameters for this file listsplitArchive
- - if archive has to be split or notsplitLength
- - if archive has to be split, then length in bytes at which it has to be split
+ZipException
+public void createZipFileFromFolder(String folderToAdd, + ZipParameters parameters, + boolean splitArchive, + long splitLength) + throws ZipException+
+
folderToAdd
- parameters
- splitArchive
- splitLength
-
+ZipException
+public void createZipFileFromFolder(File folderToAdd, + ZipParameters parameters, + boolean splitArchive, + long splitLength) + throws ZipException+
+
folderToAdd
- parameters
- splitArchive
- splitLength
-
+ZipException
+public void addFile(File sourceFile, + ZipParameters parameters) + throws ZipException+
+
sourceFile
- - File to tbe added to the zip fileparameters
- - zip parameters for this file
+ZipException
+public void addFiles(ArrayList sourceFileList, + ZipParameters parameters) + throws ZipException+
+
sourceFileList
- parameters
-
+ZipException
+public void addFolder(String path, + ZipParameters parameters) + throws ZipException+
+
path
- parameters
-
+ZipException
+public void addFolder(File path, + ZipParameters parameters) + throws ZipException+
+
path
- parameters
-
+ZipException
+public void addStream(InputStream inputStream, + ZipParameters parameters) + throws ZipException+
+
inputStream
- parameters
-
+ZipException
+public void extractAll(String destPath) + throws ZipException+
+
destPath
-
+ZipException
+public void extractAll(String destPath, + UnzipParameters unzipParameters) + throws ZipException+
+
destPath
- unzipParameters
-
+ZipException
+public void extractFile(FileHeader fileHeader, + String destPath) + throws ZipException+
+
fileHeader
- destPath
-
+ZipException
+public void extractFile(FileHeader fileHeader, + String destPath, + UnzipParameters unzipParameters) + throws ZipException+
+
fileHeader
- destPath
- unzipParameters
-
+ZipException
+public void extractFile(FileHeader fileHeader, + String destPath, + UnzipParameters unzipParameters, + String newFileName) + throws ZipException+
+
fileHeader
- destPath
- unzipParameters
- newFileName
-
+ZipException
+public void extractFile(String fileName, + String destPath) + throws ZipException+
+
fileName
- destPath
-
+ZipException
+public void extractFile(String fileName, + String destPath, + UnzipParameters unzipParameters) + throws ZipException+
+
fileName
- destPath
- unzipParameters
-
+ZipException
+public void extractFile(String fileName, + String destPath, + UnzipParameters unzipParameters, + String newFileName) + throws ZipException+
+
fileName
- destPath
- unzipParameters
- newFileName
-
+ZipException
+public void setPassword(String password) + throws ZipException+
+
password
-
+ZipException
+public void setPassword(char[] password) + throws ZipException+
+
password
-
+ZipException
+public List getFileHeaders() + throws ZipException+
+
ZipException
+public FileHeader getFileHeader(String fileName) + throws ZipException+
+
fileName
-
+ZipException
+public boolean isEncrypted() + throws ZipException+
+
ZipException
+public boolean isSplitArchive() + throws ZipException+
+
ZipException
+public void removeFile(String fileName) + throws ZipException+
+
fileName
-
+ZipException
+public void removeFile(FileHeader fileHeader) + throws ZipException+
+
fileHeader
-
+ZipException
+public void mergeSplitFiles(File outputZipFile) + throws ZipException+
+
outputZipFile
-
+ZipException
+public void setComment(String comment) + throws ZipException+
+
comment
-
+ZipException
+public String getComment() + throws ZipException+
+
ZipException
+public String getComment(String encoding) + throws ZipException+
+
encoding
-
+ZipException
+public void setFileNameCharset(String charsetName) + throws ZipException+
+
charsetName
-
+ZipException
+public ZipInputStream getInputStream(FileHeader fileHeader) + throws ZipException+
+
fileHeader
-
+ZipException
+public boolean isValidZipFile()+
+
+public ArrayList getSplitZipFiles() + throws ZipException+
+
ZipException
+public ProgressMonitor getProgressMonitor()+
+public boolean isRunInThread()+
+public void setRunInThread(boolean runInThread)+
+public File getFile()+
+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +HeaderReader + +HeaderWriter + +ZipFile |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
HeaderReader | +Helper class to read header information for the zip file | +
HeaderWriter | ++ |
ZipFile | +Base class to handle zip files. | +
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.AESDecrypter ++
public class AESDecrypter
+
+Constructor Summary | +|
---|---|
AESDecrypter(LocalFileHeader localFileHeader,
+ byte[] salt,
+ byte[] passwordVerifier)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+decryptData(byte[] buff)
+
++ |
+
+ int |
+decryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ byte[] |
+getCalculatedAuthenticationBytes()
+
++ |
+
+ int |
+getPasswordVerifierLength()
+
++ |
+
+ int |
+getSaltLength()
+
++ |
+
+ byte[] |
+getStoredMac()
+
++ |
+
+ void |
+setStoredMac(byte[] storedMac)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public AESDecrypter(LocalFileHeader localFileHeader, + byte[] salt, + byte[] passwordVerifier) + throws ZipException+
ZipException
+Method Detail | +
---|
+public int decryptData(byte[] buff, + int start, + int len) + throws ZipException+
decryptData
in interface IDecrypter
ZipException
+public int decryptData(byte[] buff) + throws ZipException+
decryptData
in interface IDecrypter
ZipException
+public int getPasswordVerifierLength()+
+public int getSaltLength()+
+public byte[] getCalculatedAuthenticationBytes()+
+public void setStoredMac(byte[] storedMac)+
+public byte[] getStoredMac()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.AESEncrpyter ++
public class AESEncrpyter
+
+Constructor Summary | +|
---|---|
AESEncrpyter(char[] password,
+ int keyStrength)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+encryptData(byte[] buff)
+
++ |
+
+ int |
+encryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ byte[] |
+getDerivedPasswordVerifier()
+
++ |
+
+ byte[] |
+getFinalMac()
+
++ |
+
+ int |
+getPasswordVeriifierLength()
+
++ |
+
+ byte[] |
+getSaltBytes()
+
++ |
+
+ int |
+getSaltLength()
+
++ |
+
+ void |
+setDerivedPasswordVerifier(byte[] derivedPasswordVerifier)
+
++ |
+
+ void |
+setSaltBytes(byte[] saltBytes)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public AESEncrpyter(char[] password, + int keyStrength) + throws ZipException+
ZipException
+Method Detail | +
---|
+public int encryptData(byte[] buff) + throws ZipException+
encryptData
in interface IEncrypter
ZipException
+public int encryptData(byte[] buff, + int start, + int len) + throws ZipException+
encryptData
in interface IEncrypter
ZipException
+public byte[] getFinalMac()+
+public byte[] getDerivedPasswordVerifier()+
+public void setDerivedPasswordVerifier(byte[] derivedPasswordVerifier)+
+public byte[] getSaltBytes()+
+public void setSaltBytes(byte[] saltBytes)+
+public int getSaltLength()+
+public int getPasswordVeriifierLength()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IDecrypter
+
+Method Summary | +|
---|---|
+ int |
+decryptData(byte[] buff)
+
++ |
+
+ int |
+decryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+Method Detail | +
---|
+int decryptData(byte[] buff, + int start, + int len) + throws ZipException+
ZipException
+int decryptData(byte[] buff) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IEncrypter
+
+Method Summary | +|
---|---|
+ int |
+encryptData(byte[] buff)
+
++ |
+
+ int |
+encryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+Method Detail | +
---|
+int encryptData(byte[] buff) + throws ZipException+
ZipException
+int encryptData(byte[] buff, + int start, + int len) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.PBKDF2.MacBasedPRF ++
public class MacBasedPRF
+
+Field Summary | +|
---|---|
+protected int |
+hLen
+
++ |
+
+protected Mac |
+mac
+
++ |
+
+protected String |
+macAlgorithm
+
++ |
+
+Constructor Summary | +|
---|---|
MacBasedPRF(String macAlgorithm)
+
++ |
+|
MacBasedPRF(String macAlgorithm,
+ String provider)
+
++ |
+
+Method Summary | +|
---|---|
+ byte[] |
+doFinal()
+
++ |
+
+ byte[] |
+doFinal(byte[] M)
+
++ |
+
+ int |
+getHLen()
+
++ |
+
+ void |
+init(byte[] P)
+
++ |
+
+ void |
+update(byte[] U)
+
++ |
+
+ void |
+update(byte[] U,
+ int start,
+ int len)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected Mac mac+
+protected int hLen+
+protected String macAlgorithm+
+Constructor Detail | +
---|
+public MacBasedPRF(String macAlgorithm)+
+public MacBasedPRF(String macAlgorithm, + String provider)+
+Method Detail | +
---|
+public byte[] doFinal(byte[] M)+
+public byte[] doFinal()+
+public int getHLen()+
+public void init(byte[] P)+
+public void update(byte[] U)+
+public void update(byte[] U, + int start, + int len)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.PBKDF2.PBKDF2Engine ++
public class PBKDF2Engine
+
+Field Summary | +|
---|---|
+protected PBKDF2Parameters |
+parameters
+
++ |
+
+protected net.lingala.zip4j.crypto.PBKDF2.PRF |
+prf
+
++ |
+
+Constructor Summary | +|
---|---|
PBKDF2Engine()
+
++ |
+|
PBKDF2Engine(PBKDF2Parameters parameters)
+
++ |
+|
PBKDF2Engine(PBKDF2Parameters parameters,
+ net.lingala.zip4j.crypto.PBKDF2.PRF prf)
+
++ |
+
+Method Summary | +|
---|---|
+protected void |
+_F(byte[] dest,
+ int offset,
+ net.lingala.zip4j.crypto.PBKDF2.PRF prf,
+ byte[] S,
+ int c,
+ int blockIndex)
+
++ |
+
+protected void |
+assertPRF(byte[] P)
+
++ |
+
+protected int |
+ceil(int a,
+ int b)
+
++ |
+
+ byte[] |
+deriveKey(char[] inputPassword)
+
++ |
+
+ byte[] |
+deriveKey(char[] inputPassword,
+ int dkLen)
+
++ |
+
+ PBKDF2Parameters |
+getParameters()
+
++ |
+
+ net.lingala.zip4j.crypto.PBKDF2.PRF |
+getPseudoRandomFunction()
+
++ |
+
+protected void |
+INT(byte[] dest,
+ int offset,
+ int i)
+
++ |
+
+protected byte[] |
+PBKDF2(net.lingala.zip4j.crypto.PBKDF2.PRF prf,
+ byte[] S,
+ int c,
+ int dkLen)
+
++ |
+
+ void |
+setParameters(PBKDF2Parameters parameters)
+
++ |
+
+ void |
+setPseudoRandomFunction(net.lingala.zip4j.crypto.PBKDF2.PRF prf)
+
++ |
+
+ boolean |
+verifyKey(char[] inputPassword)
+
++ |
+
+protected void |
+xor(byte[] dest,
+ byte[] src)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected PBKDF2Parameters parameters+
+protected net.lingala.zip4j.crypto.PBKDF2.PRF prf+
+Constructor Detail | +
---|
+public PBKDF2Engine()+
+public PBKDF2Engine(PBKDF2Parameters parameters)+
+public PBKDF2Engine(PBKDF2Parameters parameters, + net.lingala.zip4j.crypto.PBKDF2.PRF prf)+
+Method Detail | +
---|
+public byte[] deriveKey(char[] inputPassword)+
+public byte[] deriveKey(char[] inputPassword, + int dkLen)+
+public boolean verifyKey(char[] inputPassword)+
+protected void assertPRF(byte[] P)+
+public net.lingala.zip4j.crypto.PBKDF2.PRF getPseudoRandomFunction()+
+protected byte[] PBKDF2(net.lingala.zip4j.crypto.PBKDF2.PRF prf, + byte[] S, + int c, + int dkLen)+
+protected int ceil(int a, + int b)+
+protected void _F(byte[] dest, + int offset, + net.lingala.zip4j.crypto.PBKDF2.PRF prf, + byte[] S, + int c, + int blockIndex)+
+protected void xor(byte[] dest, + byte[] src)+
+protected void INT(byte[] dest, + int offset, + int i)+
+public PBKDF2Parameters getParameters()+
+public void setParameters(PBKDF2Parameters parameters)+
+public void setPseudoRandomFunction(net.lingala.zip4j.crypto.PBKDF2.PRF prf)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.PBKDF2.PBKDF2Parameters ++
public class PBKDF2Parameters
+
+Field Summary | +|
---|---|
+protected byte[] |
+derivedKey
+
++ |
+
+protected String |
+hashAlgorithm
+
++ |
+
+protected String |
+hashCharset
+
++ |
+
+protected int |
+iterationCount
+
++ |
+
+protected byte[] |
+salt
+
++ |
+
+Constructor Summary | +|
---|---|
PBKDF2Parameters()
+
++ |
+|
PBKDF2Parameters(String hashAlgorithm,
+ String hashCharset,
+ byte[] salt,
+ int iterationCount)
+
++ |
+|
PBKDF2Parameters(String hashAlgorithm,
+ String hashCharset,
+ byte[] salt,
+ int iterationCount,
+ byte[] derivedKey)
+
++ |
+
+Method Summary | +|
---|---|
+ byte[] |
+getDerivedKey()
+
++ |
+
+ String |
+getHashAlgorithm()
+
++ |
+
+ String |
+getHashCharset()
+
++ |
+
+ int |
+getIterationCount()
+
++ |
+
+ byte[] |
+getSalt()
+
++ |
+
+ void |
+setDerivedKey(byte[] derivedKey)
+
++ |
+
+ void |
+setHashAlgorithm(String hashAlgorithm)
+
++ |
+
+ void |
+setHashCharset(String hashCharset)
+
++ |
+
+ void |
+setIterationCount(int iterationCount)
+
++ |
+
+ void |
+setSalt(byte[] salt)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected byte[] salt+
+protected int iterationCount+
+protected String hashAlgorithm+
+protected String hashCharset+
+protected byte[] derivedKey+
+Constructor Detail | +
---|
+public PBKDF2Parameters()+
+public PBKDF2Parameters(String hashAlgorithm, + String hashCharset, + byte[] salt, + int iterationCount)+
+public PBKDF2Parameters(String hashAlgorithm, + String hashCharset, + byte[] salt, + int iterationCount, + byte[] derivedKey)+
+Method Detail | +
---|
+public int getIterationCount()+
+public void setIterationCount(int iterationCount)+
+public byte[] getSalt()+
+public void setSalt(byte[] salt)+
+public byte[] getDerivedKey()+
+public void setDerivedKey(byte[] derivedKey)+
+public String getHashAlgorithm()+
+public void setHashAlgorithm(String hashAlgorithm)+
+public String getHashCharset()+
+public void setHashCharset(String hashCharset)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use PBKDF2Parameters | +|
---|---|
net.lingala.zip4j.crypto.PBKDF2 | ++ |
+Uses of PBKDF2Parameters in net.lingala.zip4j.crypto.PBKDF2 | +
---|
+ +
Fields in net.lingala.zip4j.crypto.PBKDF2 declared as PBKDF2Parameters | +|
---|---|
+protected PBKDF2Parameters |
+PBKDF2Engine.parameters
+
++ |
+
+ +
Methods in net.lingala.zip4j.crypto.PBKDF2 that return PBKDF2Parameters | +|
---|---|
+ PBKDF2Parameters |
+PBKDF2Engine.getParameters()
+
++ |
+
+ +
Methods in net.lingala.zip4j.crypto.PBKDF2 with parameters of type PBKDF2Parameters | +|
---|---|
+ void |
+PBKDF2Engine.setParameters(PBKDF2Parameters parameters)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.crypto.PBKDF2 with parameters of type PBKDF2Parameters | +|
---|---|
PBKDF2Engine(PBKDF2Parameters parameters)
+
++ |
+|
PBKDF2Engine(PBKDF2Parameters parameters,
+ net.lingala.zip4j.crypto.PBKDF2.PRF prf)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +MacBasedPRF + +PBKDF2Engine + +PBKDF2Parameters |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
MacBasedPRF | ++ |
PBKDF2Engine | ++ |
PBKDF2Parameters | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.crypto.PBKDF2 | +|
---|---|
net.lingala.zip4j.crypto.PBKDF2 | ++ |
+Classes in net.lingala.zip4j.crypto.PBKDF2 used by net.lingala.zip4j.crypto.PBKDF2 | +|
---|---|
PBKDF2Parameters
+
+ + |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.StandardDecrypter ++
public class StandardDecrypter
+
+Constructor Summary | +|
---|---|
StandardDecrypter(FileHeader fileHeader,
+ byte[] headerBytes)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+decryptData(byte[] buff)
+
++ |
+
+ int |
+decryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ void |
+init(byte[] headerBytes)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StandardDecrypter(FileHeader fileHeader, + byte[] headerBytes) + throws ZipException+
ZipException
+Method Detail | +
---|
+public int decryptData(byte[] buff) + throws ZipException+
decryptData
in interface IDecrypter
ZipException
+public int decryptData(byte[] buff, + int start, + int len) + throws ZipException+
decryptData
in interface IDecrypter
ZipException
+public void init(byte[] headerBytes) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.StandardEncrypter ++
public class StandardEncrypter
+
+Constructor Summary | +|
---|---|
StandardEncrypter(char[] password,
+ int crc)
+
++ |
+
+Method Summary | +|
---|---|
+protected byte |
+encryptByte(byte val)
+
++ |
+
+ int |
+encryptData(byte[] buff)
+
++ |
+
+ int |
+encryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+protected byte[] |
+generateRandomBytes(int size)
+
++ |
+
+ byte[] |
+getHeaderBytes()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public StandardEncrypter(char[] password, + int crc) + throws ZipException+
ZipException
+Method Detail | +
---|
+public int encryptData(byte[] buff) + throws ZipException+
encryptData
in interface IEncrypter
ZipException
+public int encryptData(byte[] buff, + int start, + int len) + throws ZipException+
encryptData
in interface IEncrypter
ZipException
+protected byte encryptByte(byte val)+
+protected byte[] generateRandomBytes(int size) + throws ZipException+
ZipException
+public byte[] getHeaderBytes()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use IDecrypter | +|
---|---|
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
+Uses of IDecrypter in net.lingala.zip4j.crypto | +
---|
+ +
Classes in net.lingala.zip4j.crypto that implement IDecrypter | +|
---|---|
+ class |
+AESDecrypter
+
++ |
+
+ class |
+StandardDecrypter
+
++ |
+
+Uses of IDecrypter in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return IDecrypter | +|
---|---|
+ IDecrypter |
+UnzipEngineParameters.getIDecryptor()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type IDecrypter | +|
---|---|
+ void |
+UnzipEngineParameters.setIDecryptor(IDecrypter decrypter)
+
++ |
+
+Uses of IDecrypter in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip that return IDecrypter | +|
---|---|
+ IDecrypter |
+UnzipEngine.getDecrypter()
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use IEncrypter | +|
---|---|
net.lingala.zip4j.crypto | ++ |
+Uses of IEncrypter in net.lingala.zip4j.crypto | +
---|
+ +
Classes in net.lingala.zip4j.crypto that implement IEncrypter | +|
---|---|
+ class |
+AESEncrpyter
+
++ |
+
+ class |
+StandardEncrypter
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.engine.AESEngine ++
public class AESEngine
+Core Engine for AES Encryption +
+ +
+
+Constructor Summary | +|
---|---|
AESEngine(byte[] key)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+init(byte[] key)
+
++ |
+
+ int |
+processBlock(byte[] in,
+ byte[] out)
+
++ |
+
+ int |
+processBlock(byte[] in,
+ int inOff,
+ byte[] out,
+ int outOff)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public AESEngine(byte[] key) + throws ZipException+
ZipException
+Method Detail | +
---|
+public void init(byte[] key) + throws ZipException+
ZipException
+public int processBlock(byte[] in, + byte[] out) + throws ZipException+
ZipException
+public int processBlock(byte[] in, + int inOff, + byte[] out, + int outOff) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.crypto.engine.ZipCryptoEngine ++
public class ZipCryptoEngine
+
+Constructor Summary | +|
---|---|
ZipCryptoEngine()
+
++ |
+
+Method Summary | +|
---|---|
+ byte |
+decryptByte()
+
++ |
+
+ void |
+initKeys(char[] password)
+
++ |
+
+ void |
+updateKeys(byte charAt)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipCryptoEngine()+
+Method Detail | +
---|
+public void initKeys(char[] password)+
+public void updateKeys(byte charAt)+
+public byte decryptByte()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +AESEngine + +ZipCryptoEngine |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
AESEngine | +Core Engine for AES Encryption | +
ZipCryptoEngine | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Interfaces
+
+ +IDecrypter + +IEncrypter |
+
+Classes
+
+ +AESDecrypter + +AESEncrpyter + +StandardDecrypter + +StandardEncrypter |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Interface Summary | +|
---|---|
IDecrypter | ++ |
IEncrypter | ++ |
+ +
+Class Summary | +|
---|---|
AESDecrypter | ++ |
AESEncrpyter | ++ |
StandardDecrypter | ++ |
StandardEncrypter | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.crypto | +|
---|---|
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
+Classes in net.lingala.zip4j.crypto used by net.lingala.zip4j.crypto | +|
---|---|
IDecrypter
+
+ + |
+|
IEncrypter
+
+ + |
+
+Classes in net.lingala.zip4j.crypto used by net.lingala.zip4j.model | +|
---|---|
IDecrypter
+
+ + |
+
+Classes in net.lingala.zip4j.crypto used by net.lingala.zip4j.unzip | +|
---|---|
IDecrypter
+
+ + |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.Throwable + java.lang.Exception + net.lingala.zip4j.exception.ZipException ++
public class ZipException
+
+Constructor Summary | +|
---|---|
ZipException()
+
++ |
+|
ZipException(String msg)
+
++ |
+|
ZipException(String msg,
+ int code)
+
++ |
+|
ZipException(String message,
+ Throwable cause)
+
++ |
+|
ZipException(String message,
+ Throwable cause,
+ int code)
+
++ |
+|
ZipException(Throwable cause)
+
++ |
+|
ZipException(Throwable cause,
+ int code)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getCode()
+
++ |
+
Methods inherited from class java.lang.Throwable | +
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipException()+
+public ZipException(String msg)+
+public ZipException(String message, + Throwable cause)+
+public ZipException(String msg, + int code)+
+public ZipException(String message, + Throwable cause, + int code)+
+public ZipException(Throwable cause)+
+public ZipException(Throwable cause, + int code)+
+Method Detail | +
---|
+public int getCode()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface ZipExceptionConstants
+
+Field Summary | +|
---|---|
+static int |
+constuctorFileNotFoundException
+
++ |
+
+static int |
+inputZipParamIsNull
+
++ |
+
+static int |
+notZipFile
+
++ |
+
+static int |
+randomAccessFileNull
+
++ |
+
+static int |
+WRONG_PASSWORD
+
++ |
+
+Field Detail | +
---|
+static final int inputZipParamIsNull+
+static final int constuctorFileNotFoundException+
+static final int randomAccessFileNull+
+static final int notZipFile+
+static final int WRONG_PASSWORD+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use ZipException | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.crypto.engine | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.progress | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+Uses of ZipException in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core that throw ZipException | +|
---|---|
+ void |
+ZipFile.addFile(File sourceFile,
+ ZipParameters parameters)
+
++ Adds input source file to the zip file. |
+
+ void |
+ZipFile.addFiles(ArrayList sourceFileList,
+ ZipParameters parameters)
+
++ Adds the list of input files to the zip file. |
+
+ void |
+ZipFile.addFolder(File path,
+ ZipParameters parameters)
+
++ Adds the folder in the given file object to the zip file. |
+
+ void |
+ZipFile.addFolder(String path,
+ ZipParameters parameters)
+
++ Adds the folder in the given path to the zip file. |
+
+ void |
+ZipFile.addStream(InputStream inputStream,
+ ZipParameters parameters)
+
++ Creates a new entry in the zip file and adds the content of the inputstream to the + zip file. |
+
+ void |
+ZipFile.createZipFile(ArrayList sourceFileList,
+ ZipParameters parameters)
+
++ Creates a zip file and adds the list of source file(s) to the zip file. |
+
+ void |
+ZipFile.createZipFile(ArrayList sourceFileList,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the list of source file(s) to the zip file. |
+
+ void |
+ZipFile.createZipFile(File sourceFile,
+ ZipParameters parameters)
+
++ Creates a zip file and adds the source file to the zip file. |
+
+ void |
+ZipFile.createZipFile(File sourceFile,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the source file to the zip file. |
+
+ void |
+ZipFile.createZipFileFromFolder(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.createZipFileFromFolder(String 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(String destPath)
+
++ Extracts all the files in the given zip file to the input destination path. |
+
+ void |
+ZipFile.extractAll(String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts all the files in the given zip file to the input destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(String fileName,
+ String destPath)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(String fileName,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(String fileName,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+HeaderWriter.finalizeZipFile(ZipModel zipModel,
+ OutputStream outputStream)
+
++ Processes zip header data and writes this data to the zip file |
+
+ void |
+HeaderWriter.finalizeZipFileWithoutValidations(ZipModel zipModel,
+ OutputStream outputStream)
+
++ Processes zip header data and writes this data to the zip file without any validations. |
+
+ String |
+ZipFile.getComment()
+
++ Returns the comment set for the Zip file |
+
+ String |
+ZipFile.getComment(String encoding)
+
++ Returns the comment set for the Zip file in the input encoding |
+
+ FileHeader |
+ZipFile.getFileHeader(String fileName)
+
++ Returns FileHeader if a file header with the given fileHeader + string exists in the zip model: If not returns null |
+
+ List |
+ZipFile.getFileHeaders()
+
++ Returns the list of file headers in the zip file. |
+
+ ZipInputStream |
+ZipFile.getInputStream(FileHeader fileHeader)
+
++ Returns an input stream for reading the contents of the Zip file corresponding + to the input FileHeader. |
+
+ ArrayList |
+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 encrypted |
+
+ boolean |
+ZipFile.isSplitArchive()
+
++ Checks if the zip file is a split archive |
+
+ void |
+ZipFile.mergeSplitFiles(File outputZipFile)
+
++ Merges split zip files into a single zip file without the need to extract the + files in the archive |
+
+ ZipModel |
+HeaderReader.readAllHeaders()
+
++ Reads all the header information for the zip file. |
+
+ ZipModel |
+HeaderReader.readAllHeaders(String fileNameCharset)
+
++ Reads all the header information for the zip file. |
+
+ LocalFileHeader |
+HeaderReader.readLocalFileHeader(FileHeader fileHeader)
+
++ Reads local file header for the given file header |
+
+ void |
+ZipFile.removeFile(FileHeader fileHeader)
+
++ Removes the file provided in the input file header from the zip file. |
+
+ void |
+ZipFile.removeFile(String fileName)
+
++ Removes the file provided in the input paramters from the zip file. |
+
+ void |
+ZipFile.setComment(String comment)
+
++ Sets comment for the Zip file |
+
+ void |
+ZipFile.setFileNameCharset(String charsetName)
+
++ Zip4j will encode all the file names with the input charset. |
+
+ void |
+ZipFile.setPassword(char[] password)
+
++ Sets the password for the zip file |
+
+ void |
+ZipFile.setPassword(String password)
+
++ Sets the password for the zip file. + Note: For security reasons, usage of this method is discouraged. |
+
+ void |
+HeaderWriter.updateLocalFileHeader(LocalFileHeader localFileHeader,
+ long offset,
+ int toUpdate,
+ ZipModel zipModel,
+ byte[] bytesToWrite,
+ int noOfDisk,
+ SplitOutputStream outputStream)
+
++ |
+
+ int |
+HeaderWriter.writeExtendedLocalHeader(LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
+ int |
+HeaderWriter.writeLocalFileHeader(ZipModel zipModel,
+ LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.core that throw ZipException | +|
---|---|
ZipFile(File zipFile)
+
++ Creates a new Zip File Object with the input file. |
+|
ZipFile(String zipFile)
+
++ Creates a new Zip File Object with the given zip file path. |
+
+Uses of ZipException in net.lingala.zip4j.crypto | +
---|
+ +
Methods in net.lingala.zip4j.crypto that throw ZipException | +|
---|---|
+ int |
+StandardDecrypter.decryptData(byte[] buff)
+
++ |
+
+ int |
+IDecrypter.decryptData(byte[] buff)
+
++ |
+
+ int |
+AESDecrypter.decryptData(byte[] buff)
+
++ |
+
+ int |
+StandardDecrypter.decryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ int |
+IDecrypter.decryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ int |
+AESDecrypter.decryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ int |
+StandardEncrypter.encryptData(byte[] buff)
+
++ |
+
+ int |
+IEncrypter.encryptData(byte[] buff)
+
++ |
+
+ int |
+AESEncrpyter.encryptData(byte[] buff)
+
++ |
+
+ int |
+StandardEncrypter.encryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ int |
+IEncrypter.encryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+ int |
+AESEncrpyter.encryptData(byte[] buff,
+ int start,
+ int len)
+
++ |
+
+protected byte[] |
+StandardEncrypter.generateRandomBytes(int size)
+
++ |
+
+ void |
+StandardDecrypter.init(byte[] headerBytes)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.crypto that throw ZipException | +|
---|---|
AESDecrypter(LocalFileHeader localFileHeader,
+ byte[] salt,
+ byte[] passwordVerifier)
+
++ |
+|
AESEncrpyter(char[] password,
+ int keyStrength)
+
++ |
+|
StandardDecrypter(FileHeader fileHeader,
+ byte[] headerBytes)
+
++ |
+|
StandardEncrypter(char[] password,
+ int crc)
+
++ |
+
+Uses of ZipException in net.lingala.zip4j.crypto.engine | +
---|
+ +
Methods in net.lingala.zip4j.crypto.engine that throw ZipException | +|
---|---|
+ 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 | +|
---|---|
AESEngine(byte[] key)
+
++ |
+
+Uses of ZipException in net.lingala.zip4j.io | +
---|
+ +
Methods in net.lingala.zip4j.io that throw ZipException | +|
---|---|
+ boolean |
+SplitOutputStream.checkBuffSizeAndStartNextSplitFile(int bufferSize)
+
++ Checks if the buffer size is sufficient for the current split file. |
+
+ void |
+DeflaterOutputStream.closeEntry()
+
++ |
+
+ void |
+CipherOutputStream.closeEntry()
+
++ |
+
+ void |
+DeflaterOutputStream.finish()
+
++ |
+
+ void |
+CipherOutputStream.finish()
+
++ |
+
+ boolean |
+SplitOutputStream.isBuffSizeFitForCurrSplitFile(int bufferSize)
+
++ Checks if the given buffer size will be fit in the current split file. |
+
+ void |
+DeflaterOutputStream.putNextEntry(File file,
+ ZipParameters zipParameters)
+
++ |
+
+ void |
+CipherOutputStream.putNextEntry(File file,
+ ZipParameters zipParameters)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.io that throw ZipException | +|
---|---|
SplitOutputStream(File file)
+
++ |
+|
SplitOutputStream(File file,
+ long splitLength)
+
++ |
+|
SplitOutputStream(String name)
+
++ |
+|
SplitOutputStream(String name,
+ long splitLength)
+
++ |
+
+Uses of ZipException in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that throw ZipException | +|
---|---|
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters. |
+
+Uses of ZipException in net.lingala.zip4j.progress | +
---|
+ +
Methods in net.lingala.zip4j.progress that throw ZipException | +|
---|---|
+ void |
+ProgressMonitor.endProgressMonitorError(Throwable e)
+
++ |
+
+ void |
+ProgressMonitor.endProgressMonitorSuccess()
+
++ |
+
+Uses of ZipException in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip that throw ZipException | +|
---|---|
+static void |
+UnzipUtil.applyFileAttributes(FileHeader fileHeader,
+ File file)
+
++ |
+
+static void |
+UnzipUtil.applyFileAttributes(FileHeader fileHeader,
+ File file,
+ UnzipParameters unzipParameters)
+
++ |
+
+ void |
+UnzipEngine.checkCRC()
+
++ |
+
+ void |
+Unzip.extractAll(UnzipParameters unzipParameters,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+Unzip.extractFile(FileHeader fileHeader,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ ZipInputStream |
+UnzipEngine.getInputStream()
+
++ |
+
+ ZipInputStream |
+Unzip.getInputStream(FileHeader fileHeader)
+
++ |
+
+ void |
+UnzipEngine.unzipFile(ProgressMonitor progressMonitor,
+ String outPath,
+ String newFileName,
+ UnzipParameters unzipParameters)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.unzip that throw ZipException | +|
---|---|
Unzip(ZipModel zipModel)
+
++ |
+|
UnzipEngine(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+Uses of ZipException in net.lingala.zip4j.util | +
---|
+ +
Methods in net.lingala.zip4j.util that throw ZipException | +|
---|---|
+static byte |
+Raw.bitArrayToByte(int[] bitArray)
+
++ |
+
+static boolean |
+Zip4jUtil.checkArrayListTypes(ArrayList sourceList,
+ int type)
+
++ Checks to see if all the elements in the arraylist match the given type |
+
+static boolean |
+Zip4jUtil.checkFileExists(File file)
+
++ |
+
+static boolean |
+Zip4jUtil.checkFileExists(String path)
+
++ |
+
+static boolean |
+Zip4jUtil.checkFileReadAccess(String path)
+
++ |
+
+static boolean |
+Zip4jUtil.checkFileWriteAccess(String path)
+
++ |
+
+static boolean |
+Zip4jUtil.checkOutputFolder(String path)
+
++ |
+
+static long |
+CRCUtil.computeFileCRC(String inputFile)
+
++ |
+
+static long |
+CRCUtil.computeFileCRC(String inputFile,
+ ProgressMonitor progressMonitor)
+
++ Calculates CRC of a file |
+
+static byte[] |
+Zip4jUtil.convertCharset(String str)
+
++ |
+
+static String |
+Zip4jUtil.detectCharSet(String str)
+
++ Detects the encoding charset for the input string |
+
+static String |
+Zip4jUtil.getAbsoluteFilePath(String filePath)
+
++ Returns an absoulte path for the given file path |
+
+static int |
+Zip4jUtil.getEncodedStringLength(String str)
+
++ returns the length of the string by wrapping it in a byte buffer with + the appropriate charset of the input string and returns the limit of the + byte buffer |
+
+static int |
+Zip4jUtil.getEncodedStringLength(String str,
+ String charset)
+
++ returns the length of the string in the input encoding |
+
+static FileHeader |
+Zip4jUtil.getFileHeader(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static FileHeader |
+Zip4jUtil.getFileHeaderWithExactMatch(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static long |
+Zip4jUtil.getFileLengh(File file)
+
++ |
+
+static long |
+Zip4jUtil.getFileLengh(String file)
+
++ |
+
+static String |
+Zip4jUtil.getFileNameFromFilePath(File file)
+
++ |
+
+static ArrayList |
+Zip4jUtil.getFilesInDirectoryRec(File path,
+ boolean readHiddenFiles)
+
++ |
+
+static int |
+Zip4jUtil.getIndexOfFileHeader(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+static long |
+Zip4jUtil.getLastModifiedFileTime(File file,
+ TimeZone timeZone)
+
++ |
+
+static String |
+Zip4jUtil.getRelativeFileName(String file,
+ String rootFolderInZip,
+ String rootFolderPath)
+
++ |
+
+static ArrayList |
+Zip4jUtil.getSplitZipFiles(ZipModel zipModel)
+
++ |
+
+static String |
+Zip4jUtil.getZipFileNameWithoutExt(String zipFile)
+
++ |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForMergeOp(ZipModel zipModel,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForRemoveOp(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ HashMap |
+ArchiveMaintainer.initRemoveZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+static boolean |
+Zip4jUtil.isSupportedCharset(String charset)
+
++ Checks if the input charset is supported |
+
+ void |
+ArchiveMaintainer.mergeSplitZipFiles(ZipModel zipModel,
+ File outputZipFile,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Merges split Zip files into a single Zip file |
+
+static int |
+Raw.readLeInt(DataInput di,
+ byte[] b)
+
++ |
+
+ HashMap |
+ArchiveMaintainer.removeZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ArchiveMaintainer.setComment(ZipModel zipModel,
+ String comment)
+
++ |
+
+static void |
+Zip4jUtil.setFileArchive(File file)
+
++ |
+
+static void |
+Zip4jUtil.setFileHidden(File file)
+
++ |
+
+static void |
+Zip4jUtil.setFileReadOnly(File file)
+
++ |
+
+static void |
+Zip4jUtil.setFileSystemMode(File file)
+
++ |
+
+Uses of ZipException in net.lingala.zip4j.zip | +
---|
+ +
Methods in net.lingala.zip4j.zip that throw ZipException | +|
---|---|
+ void |
+ZipEngine.addFiles(ArrayList fileList,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ZipEngine.addFolderToZip(File file,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ZipEngine.addStreamToZip(InputStream inputStream,
+ ZipParameters parameters)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.zip that throw ZipException | +|
---|---|
ZipEngine(ZipModel zipModel)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Interfaces
+
+ +ZipExceptionConstants |
+
+Exceptions
+
+ +ZipException |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Interface Summary | +|
---|---|
ZipExceptionConstants | ++ |
+ +
+Exception Summary | +|
---|---|
ZipException | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.exception | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.crypto.engine | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.progress | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.core | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.crypto | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.crypto.engine | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.io | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.model | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.progress | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.unzip | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.util | +|
---|---|
ZipException
+
+ + |
+
+Classes in net.lingala.zip4j.exception used by net.lingala.zip4j.zip | +|
---|---|
ZipException
+
+ + |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.InputStream + net.lingala.zip4j.io.BaseInputStream ++
public abstract class BaseInputStream
+
+Constructor Summary | +|
---|---|
BaseInputStream()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+available()
+
++ |
+
+ UnzipEngine |
+getUnzipEngine()
+
++ |
+
+ int |
+read()
+
++ |
+
+ void |
+seek(long pos)
+
++ |
+
Methods inherited from class java.io.InputStream | +
---|
close, mark, markSupported, read, read, reset, skip |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public BaseInputStream()+
+Method Detail | +
---|
+public int read() + throws IOException+
read
in class InputStream
IOException
+public void seek(long pos) + throws IOException+
IOException
+public int available() + throws IOException+
available
in class InputStream
IOException
+public UnzipEngine getUnzipEngine()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.OutputStream + net.lingala.zip4j.io.BaseOutputStream ++
public abstract class BaseOutputStream
+
+Constructor Summary | +|
---|---|
BaseOutputStream()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+write(int b)
+
++ |
+
Methods inherited from class java.io.OutputStream | +
---|
close, flush, write, write |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public BaseOutputStream()+
+Method Detail | +
---|
+public void write(int b) + throws IOException+
write
in class OutputStream
IOException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.OutputStream + net.lingala.zip4j.io.BaseOutputStream + net.lingala.zip4j.io.CipherOutputStream ++
public class CipherOutputStream
+
+Field Summary | +|
---|---|
+protected CRC32 |
+crc
+
++ |
+
+protected FileHeader |
+fileHeader
+
++ |
+
+protected LocalFileHeader |
+localFileHeader
+
++ |
+
+protected OutputStream |
+outputStream
+
++ |
+
+protected ZipModel |
+zipModel
+
++ |
+
+protected ZipParameters |
+zipParameters
+
++ |
+
+Constructor Summary | +|
---|---|
CipherOutputStream(OutputStream outputStream,
+ ZipModel zipModel)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+close()
+
++ |
+
+ void |
+closeEntry()
+
++ |
+
+ void |
+decrementCompressedFileSize(int value)
+
++ |
+
+ void |
+finish()
+
++ |
+
+ File |
+getSourceFile()
+
++ |
+
+ void |
+putNextEntry(File file,
+ ZipParameters zipParameters)
+
++ |
+
+ void |
+setSourceFile(File sourceFile)
+
++ |
+
+protected void |
+updateTotalBytesRead(int toUpdate)
+
++ |
+
+ void |
+write(byte[] b)
+
++ |
+
+ void |
+write(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ void |
+write(int bval)
+
++ |
+
Methods inherited from class java.io.OutputStream | +
---|
flush |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected OutputStream outputStream+
+protected FileHeader fileHeader+
+protected LocalFileHeader localFileHeader+
+protected ZipParameters zipParameters+
+protected ZipModel zipModel+
+protected CRC32 crc+
+Constructor Detail | +
---|
+public CipherOutputStream(OutputStream outputStream, + ZipModel zipModel)+
+Method Detail | +
---|
+public void putNextEntry(File file, + ZipParameters zipParameters) + throws ZipException+
ZipException
+public void write(int bval) + throws IOException+
write
in class BaseOutputStream
IOException
+public void write(byte[] b) + throws IOException+
write
in class OutputStream
IOException
+public void write(byte[] b, + int off, + int len) + throws IOException+
write
in class OutputStream
IOException
+public void closeEntry() + throws IOException, + ZipException+
IOException
+ZipException
+public void finish() + throws IOException, + ZipException+
IOException
+ZipException
+public void close() + throws IOException+
close
in interface Closeable
close
in class OutputStream
IOException
+public void decrementCompressedFileSize(int value)+
+protected void updateTotalBytesRead(int toUpdate)+
+public void setSourceFile(File sourceFile)+
+public File getSourceFile()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.OutputStream + net.lingala.zip4j.io.BaseOutputStream + net.lingala.zip4j.io.CipherOutputStream + net.lingala.zip4j.io.DeflaterOutputStream ++
public class DeflaterOutputStream
+
+Field Summary | +|
---|---|
+protected Deflater |
+deflater
+
++ |
+
Fields inherited from class net.lingala.zip4j.io.CipherOutputStream | +
---|
crc, fileHeader, localFileHeader, outputStream, zipModel, zipParameters |
+
+Constructor Summary | +|
---|---|
DeflaterOutputStream(OutputStream outputStream,
+ ZipModel zipModel)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+closeEntry()
+
++ |
+
+ void |
+finish()
+
++ |
+
+ void |
+putNextEntry(File file,
+ ZipParameters zipParameters)
+
++ |
+
+ void |
+write(byte[] b)
+
++ |
+
+ void |
+write(byte[] buf,
+ int off,
+ int len)
+
++ |
+
+ void |
+write(int bval)
+
++ |
+
Methods inherited from class net.lingala.zip4j.io.CipherOutputStream | +
---|
close, decrementCompressedFileSize, getSourceFile, setSourceFile, updateTotalBytesRead |
+
Methods inherited from class java.io.OutputStream | +
---|
flush |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected Deflater deflater+
+Constructor Detail | +
---|
+public DeflaterOutputStream(OutputStream outputStream, + ZipModel zipModel)+
+Method Detail | +
---|
+public void putNextEntry(File file, + ZipParameters zipParameters) + throws ZipException+
putNextEntry
in class CipherOutputStream
ZipException
+public void write(byte[] b) + throws IOException+
write
in class CipherOutputStream
IOException
+public void write(int bval) + throws IOException+
write
in class CipherOutputStream
IOException
+public void write(byte[] buf, + int off, + int len) + throws IOException+
write
in class CipherOutputStream
IOException
+public void closeEntry() + throws IOException, + ZipException+
closeEntry
in class CipherOutputStream
IOException
+ZipException
+public void finish() + throws IOException, + ZipException+
finish
in class CipherOutputStream
IOException
+ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.InputStream + net.lingala.zip4j.io.BaseInputStream + net.lingala.zip4j.io.PartInputStream + net.lingala.zip4j.io.InflaterInputStream ++
public class InflaterInputStream
+
+Constructor Summary | +|
---|---|
InflaterInputStream(RandomAccessFile raf,
+ long start,
+ long len,
+ UnzipEngine unzipEngine)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+available()
+
++ Returns 0 after EOF has been reached, otherwise always return 1. |
+
+ void |
+close()
+
++ |
+
+ UnzipEngine |
+getUnzipEngine()
+
++ |
+
+ int |
+read()
+
++ |
+
+ int |
+read(byte[] b)
+
++ |
+
+ int |
+read(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ void |
+seek(long pos)
+
++ |
+
+ long |
+skip(long n)
+
++ Skips specified number of bytes of uncompressed data. |
+
Methods inherited from class java.io.InputStream | +
---|
mark, markSupported, reset |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public InflaterInputStream(RandomAccessFile raf, + long start, + long len, + UnzipEngine unzipEngine)+
+Method Detail | +
---|
+public int read() + throws IOException+
read
in class PartInputStream
IOException
+public int read(byte[] b) + throws IOException+
read
in class PartInputStream
IOException
+public int read(byte[] b, + int off, + int len) + throws IOException+
read
in class PartInputStream
IOException
+public long skip(long n) + throws IOException+
+
skip
in class PartInputStream
n
- the number of bytes to skip
+IOException
- if an I/O error has occurred
+IllegalArgumentException
- if n < 0+public void seek(long pos) + throws IOException+
seek
in class PartInputStream
IOException
+public int available()+
+ Programs should not count on this method to return the actual number + of bytes that could be read without blocking. +
+
available
in class PartInputStream
IOException
- if an I/O error occurs.+public void close() + throws IOException+
close
in interface Closeable
close
in class PartInputStream
IOException
+public UnzipEngine getUnzipEngine()+
getUnzipEngine
in class PartInputStream
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.InputStream + net.lingala.zip4j.io.BaseInputStream + net.lingala.zip4j.io.PartInputStream ++
public class PartInputStream
+
+Constructor Summary | +|
---|---|
PartInputStream(RandomAccessFile raf,
+ long start,
+ long len,
+ UnzipEngine unzipEngine)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+available()
+
++ |
+
+ void |
+close()
+
++ |
+
+ UnzipEngine |
+getUnzipEngine()
+
++ |
+
+ int |
+read()
+
++ |
+
+ int |
+read(byte[] b)
+
++ |
+
+ int |
+read(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ void |
+seek(long pos)
+
++ |
+
+ long |
+skip(long amount)
+
++ |
+
Methods inherited from class java.io.InputStream | +
---|
mark, markSupported, reset |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public PartInputStream(RandomAccessFile raf, + long start, + long len, + UnzipEngine unzipEngine)+
+Method Detail | +
---|
+public int available()+
available
in class BaseInputStream
+public int read() + throws IOException+
read
in class BaseInputStream
IOException
+public int read(byte[] b) + throws IOException+
read
in class InputStream
IOException
+public int read(byte[] b, + int off, + int len) + throws IOException+
read
in class InputStream
IOException
+public long skip(long amount) + throws IOException+
skip
in class InputStream
IOException
+public void close() + throws IOException+
close
in interface Closeable
close
in class InputStream
IOException
+public void seek(long pos) + throws IOException+
seek
in class BaseInputStream
IOException
+public UnzipEngine getUnzipEngine()+
getUnzipEngine
in class BaseInputStream
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.OutputStream + net.lingala.zip4j.io.SplitOutputStream ++
public class SplitOutputStream
+
+Constructor Summary | +|
---|---|
SplitOutputStream(File file)
+
++ |
+|
SplitOutputStream(File file,
+ long splitLength)
+
++ |
+|
SplitOutputStream(String name)
+
++ |
+|
SplitOutputStream(String name,
+ long splitLength)
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+checkBuffSizeAndStartNextSplitFile(int bufferSize)
+
++ Checks if the buffer size is sufficient for the current split file. |
+
+ void |
+close()
+
++ |
+
+ void |
+flush()
+
++ |
+
+ int |
+getCurrSplitFileCounter()
+
++ |
+
+ long |
+getFilePointer()
+
++ |
+
+ long |
+getSplitLength()
+
++ |
+
+ boolean |
+isBuffSizeFitForCurrSplitFile(int bufferSize)
+
++ Checks if the given buffer size will be fit in the current split file. |
+
+ boolean |
+isSplitZipFile()
+
++ |
+
+ void |
+seek(long pos)
+
++ |
+
+ void |
+write(byte[] b)
+
++ |
+
+ void |
+write(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ void |
+write(int b)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public SplitOutputStream(String name) + throws FileNotFoundException, + ZipException+
FileNotFoundException
+ZipException
+public SplitOutputStream(File file) + throws FileNotFoundException, + ZipException+
FileNotFoundException
+ZipException
+public SplitOutputStream(String name, + long splitLength) + throws FileNotFoundException, + ZipException+
FileNotFoundException
+ZipException
+public SplitOutputStream(File file, + long splitLength) + throws FileNotFoundException, + ZipException+
FileNotFoundException
+ZipException
+Method Detail | +
---|
+public void write(int b) + throws IOException+
write
in class OutputStream
IOException
+public void write(byte[] b) + throws IOException+
write
in class OutputStream
IOException
+public void write(byte[] b, + int off, + int len) + throws IOException+
write
in class OutputStream
IOException
+public boolean checkBuffSizeAndStartNextSplitFile(int bufferSize) + throws ZipException+
+
bufferSize
-
+ZipException
+public boolean isBuffSizeFitForCurrSplitFile(int bufferSize) + throws ZipException+
+
bufferSize
-
+ZipException
+public void seek(long pos) + throws IOException+
IOException
+public void close() + throws IOException+
close
in interface Closeable
close
in class OutputStream
IOException
+public void flush() + throws IOException+
flush
in interface Flushable
flush
in class OutputStream
IOException
+public long getFilePointer() + throws IOException+
IOException
+public boolean isSplitZipFile()+
+public long getSplitLength()+
+public int getCurrSplitFileCounter()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.InputStream + net.lingala.zip4j.io.ZipInputStream ++
public class ZipInputStream
+
+Constructor Summary | +|
---|---|
ZipInputStream(BaseInputStream is)
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+available()
+
++ |
+
+ void |
+close()
+
++ Closes the input stream and releases any resources. |
+
+ void |
+close(boolean skipCRCCheck)
+
++ Closes the input stream and releases any resources. |
+
+ int |
+read()
+
++ |
+
+ int |
+read(byte[] b)
+
++ |
+
+ int |
+read(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ long |
+skip(long n)
+
++ |
+
Methods inherited from class java.io.InputStream | +
---|
mark, markSupported, reset |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipInputStream(BaseInputStream is)+
+Method Detail | +
---|
+public int read() + throws IOException+
read
in class InputStream
IOException
+public int read(byte[] b) + throws IOException+
read
in class InputStream
IOException
+public int read(byte[] b, + int off, + int len) + throws IOException+
read
in class InputStream
IOException
+public void close() + throws IOException+
+
close
in interface Closeable
close
in class InputStream
IOException
+public void close(boolean skipCRCCheck) + throws IOException+
+
IOException
+public int available() + throws IOException+
available
in class InputStream
IOException
+public long skip(long n) + throws IOException+
skip
in class InputStream
IOException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.OutputStream + net.lingala.zip4j.io.BaseOutputStream + net.lingala.zip4j.io.CipherOutputStream + net.lingala.zip4j.io.DeflaterOutputStream + net.lingala.zip4j.io.ZipOutputStream ++
public class ZipOutputStream
+
+Field Summary | +
---|
Fields inherited from class net.lingala.zip4j.io.DeflaterOutputStream | +
---|
deflater |
+
Fields inherited from class net.lingala.zip4j.io.CipherOutputStream | +
---|
crc, fileHeader, localFileHeader, outputStream, zipModel, zipParameters |
+
+Constructor Summary | +|
---|---|
ZipOutputStream(OutputStream outputStream)
+
++ |
+|
ZipOutputStream(OutputStream outputStream,
+ ZipModel zipModel)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+write(byte[] b)
+
++ |
+
+ void |
+write(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ void |
+write(int bval)
+
++ |
+
Methods inherited from class net.lingala.zip4j.io.DeflaterOutputStream | +
---|
closeEntry, finish, putNextEntry |
+
Methods inherited from class net.lingala.zip4j.io.CipherOutputStream | +
---|
close, decrementCompressedFileSize, getSourceFile, setSourceFile, updateTotalBytesRead |
+
Methods inherited from class java.io.OutputStream | +
---|
flush |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipOutputStream(OutputStream outputStream)+
+public ZipOutputStream(OutputStream outputStream, + ZipModel zipModel)+
+Method Detail | +
---|
+public void write(int bval) + throws IOException+
write
in class DeflaterOutputStream
IOException
+public void write(byte[] b) + throws IOException+
write
in class DeflaterOutputStream
IOException
+public void write(byte[] b, + int off, + int len) + throws IOException+
write
in class DeflaterOutputStream
IOException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use BaseInputStream | +|
---|---|
net.lingala.zip4j.io | ++ |
+Uses of BaseInputStream in net.lingala.zip4j.io | +
---|
+ +
Subclasses of BaseInputStream in net.lingala.zip4j.io | +|
---|---|
+ class |
+InflaterInputStream
+
++ |
+
+ class |
+PartInputStream
+
++ |
+
+ +
Constructors in net.lingala.zip4j.io with parameters of type BaseInputStream | +|
---|---|
ZipInputStream(BaseInputStream is)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use BaseOutputStream | +|
---|---|
net.lingala.zip4j.io | ++ |
+Uses of BaseOutputStream in net.lingala.zip4j.io | +
---|
+ +
Subclasses of BaseOutputStream in net.lingala.zip4j.io | +|
---|---|
+ class |
+CipherOutputStream
+
++ |
+
+ class |
+DeflaterOutputStream
+
++ |
+
+ class |
+ZipOutputStream
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use CipherOutputStream | +|
---|---|
net.lingala.zip4j.io | ++ |
+Uses of CipherOutputStream in net.lingala.zip4j.io | +
---|
+ +
Subclasses of CipherOutputStream in net.lingala.zip4j.io | +|
---|---|
+ class |
+DeflaterOutputStream
+
++ |
+
+ class |
+ZipOutputStream
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use DeflaterOutputStream | +|
---|---|
net.lingala.zip4j.io | ++ |
+Uses of DeflaterOutputStream in net.lingala.zip4j.io | +
---|
+ +
Subclasses of DeflaterOutputStream in net.lingala.zip4j.io | +|
---|---|
+ class |
+ZipOutputStream
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use PartInputStream | +|
---|---|
net.lingala.zip4j.io | ++ |
+Uses of PartInputStream in net.lingala.zip4j.io | +
---|
+ +
Subclasses of PartInputStream in net.lingala.zip4j.io | +|
---|---|
+ class |
+InflaterInputStream
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use SplitOutputStream | +|
---|---|
net.lingala.zip4j.core | ++ |
+Uses of SplitOutputStream in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core with parameters of type SplitOutputStream | +|
---|---|
+ void |
+HeaderWriter.updateLocalFileHeader(LocalFileHeader localFileHeader,
+ long offset,
+ int toUpdate,
+ ZipModel zipModel,
+ byte[] bytesToWrite,
+ int noOfDisk,
+ SplitOutputStream outputStream)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use ZipInputStream | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.unzip | ++ |
+Uses of ZipInputStream in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core that return ZipInputStream | +|
---|---|
+ ZipInputStream |
+ZipFile.getInputStream(FileHeader fileHeader)
+
++ Returns an input stream for reading the contents of the Zip file corresponding + to the input FileHeader. |
+
+Uses of ZipInputStream in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip that return ZipInputStream | +|
---|---|
+ ZipInputStream |
+UnzipEngine.getInputStream()
+
++ |
+
+ ZipInputStream |
+Unzip.getInputStream(FileHeader fileHeader)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +BaseInputStream + +BaseOutputStream + +CipherOutputStream + +DeflaterOutputStream + +InflaterInputStream + +PartInputStream + +SplitOutputStream + +ZipInputStream + +ZipOutputStream |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
BaseInputStream | ++ |
BaseOutputStream | ++ |
CipherOutputStream | ++ |
DeflaterOutputStream | ++ |
InflaterInputStream | ++ |
PartInputStream | ++ |
SplitOutputStream | ++ |
ZipInputStream | ++ |
ZipOutputStream | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.io | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.unzip | ++ |
+Classes in net.lingala.zip4j.io used by net.lingala.zip4j.core | +|
---|---|
SplitOutputStream
+
+ + |
+|
ZipInputStream
+
+ + |
+
+Classes in net.lingala.zip4j.io used by net.lingala.zip4j.io | +|
---|---|
BaseInputStream
+
+ + |
+|
BaseOutputStream
+
+ + |
+|
CipherOutputStream
+
+ + |
+|
DeflaterOutputStream
+
+ + |
+|
PartInputStream
+
+ + |
+
+Classes in net.lingala.zip4j.io used by net.lingala.zip4j.unzip | +|
---|---|
ZipInputStream
+
+ + |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.AESExtraDataRecord ++
public class AESExtraDataRecord
+
+Constructor Summary | +|
---|---|
AESExtraDataRecord()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getAesStrength()
+
++ |
+
+ int |
+getCompressionMethod()
+
++ |
+
+ int |
+getDataSize()
+
++ |
+
+ long |
+getSignature()
+
++ |
+
+ String |
+getVendorID()
+
++ |
+
+ int |
+getVersionNumber()
+
++ |
+
+ void |
+setAesStrength(int aesStrength)
+
++ |
+
+ void |
+setCompressionMethod(int compressionMethod)
+
++ |
+
+ void |
+setDataSize(int dataSize)
+
++ |
+
+ void |
+setSignature(long signature)
+
++ |
+
+ void |
+setVendorID(String vendorID)
+
++ |
+
+ void |
+setVersionNumber(int versionNumber)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public AESExtraDataRecord()+
+Method Detail | +
---|
+public long getSignature()+
+public void setSignature(long signature)+
+public int getDataSize()+
+public void setDataSize(int dataSize)+
+public int getVersionNumber()+
+public void setVersionNumber(int versionNumber)+
+public String getVendorID()+
+public void setVendorID(String vendorID)+
+public int getAesStrength()+
+public void setAesStrength(int aesStrength)+
+public int getCompressionMethod()+
+public void setCompressionMethod(int compressionMethod)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.ArchiveExtraDataRecord ++
public class ArchiveExtraDataRecord
+
+Constructor Summary | +|
---|---|
ArchiveExtraDataRecord()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getExtraFieldData()
+
++ |
+
+ int |
+getExtraFieldLength()
+
++ |
+
+ int |
+getSignature()
+
++ |
+
+ void |
+setExtraFieldData(String extraFieldData)
+
++ |
+
+ void |
+setExtraFieldLength(int extraFieldLength)
+
++ |
+
+ void |
+setSignature(int signature)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ArchiveExtraDataRecord()+
+Method Detail | +
---|
+public int getSignature()+
+public void setSignature(int signature)+
+public int getExtraFieldLength()+
+public void setExtraFieldLength(int extraFieldLength)+
+public String getExtraFieldData()+
+public void setExtraFieldData(String extraFieldData)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.CentralDirectory ++
public class CentralDirectory
+
+Constructor Summary | +|
---|---|
CentralDirectory()
+
++ |
+
+Method Summary | +|
---|---|
+ DigitalSignature |
+getDigitalSignature()
+
++ |
+
+ ArrayList |
+getFileHeaders()
+
++ |
+
+ void |
+setDigitalSignature(DigitalSignature digitalSignature)
+
++ |
+
+ void |
+setFileHeaders(ArrayList fileHeaders)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public CentralDirectory()+
+Method Detail | +
---|
+public ArrayList getFileHeaders()+
+public void setFileHeaders(ArrayList fileHeaders)+
+public DigitalSignature getDigitalSignature()+
+public void setDigitalSignature(DigitalSignature digitalSignature)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.DataDescriptor ++
public class DataDescriptor
+
+Constructor Summary | +|
---|---|
DataDescriptor()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getCompressedSize()
+
++ |
+
+ String |
+getCrc32()
+
++ |
+
+ int |
+getUncompressedSize()
+
++ |
+
+ void |
+setCompressedSize(int compressedSize)
+
++ |
+
+ void |
+setCrc32(String crc32)
+
++ |
+
+ void |
+setUncompressedSize(int uncompressedSize)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DataDescriptor()+
+Method Detail | +
---|
+public String getCrc32()+
+public void setCrc32(String crc32)+
+public int getCompressedSize()+
+public void setCompressedSize(int compressedSize)+
+public int getUncompressedSize()+
+public void setUncompressedSize(int uncompressedSize)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.DigitalSignature ++
public class DigitalSignature
+
+Constructor Summary | +|
---|---|
DigitalSignature()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getHeaderSignature()
+
++ |
+
+ String |
+getSignatureData()
+
++ |
+
+ int |
+getSizeOfData()
+
++ |
+
+ void |
+setHeaderSignature(int headerSignature)
+
++ |
+
+ void |
+setSignatureData(String signatureData)
+
++ |
+
+ void |
+setSizeOfData(int sizeOfData)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public DigitalSignature()+
+Method Detail | +
---|
+public int getHeaderSignature()+
+public void setHeaderSignature(int headerSignature)+
+public int getSizeOfData()+
+public void setSizeOfData(int sizeOfData)+
+public String getSignatureData()+
+public void setSignatureData(String signatureData)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.EndCentralDirRecord ++
public class EndCentralDirRecord
+
+Constructor Summary | +|
---|---|
EndCentralDirRecord()
+
++ |
+
+Method Summary | +|
---|---|
+ String |
+getComment()
+
++ |
+
+ byte[] |
+getCommentBytes()
+
++ |
+
+ int |
+getCommentLength()
+
++ |
+
+ int |
+getNoOfThisDisk()
+
++ |
+
+ int |
+getNoOfThisDiskStartOfCentralDir()
+
++ |
+
+ long |
+getOffsetOfStartOfCentralDir()
+
++ |
+
+ long |
+getSignature()
+
++ |
+
+ int |
+getSizeOfCentralDir()
+
++ |
+
+ int |
+getTotNoOfEntriesInCentralDir()
+
++ |
+
+ int |
+getTotNoOfEntriesInCentralDirOnThisDisk()
+
++ |
+
+ void |
+setComment(String comment)
+
++ |
+
+ void |
+setCommentBytes(byte[] commentBytes)
+
++ |
+
+ void |
+setCommentLength(int commentLength)
+
++ |
+
+ void |
+setNoOfThisDisk(int noOfThisDisk)
+
++ |
+
+ void |
+setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir)
+
++ |
+
+ void |
+setOffsetOfStartOfCentralDir(long offSetOfStartOfCentralDir)
+
++ |
+
+ void |
+setSignature(long signature)
+
++ |
+
+ void |
+setSizeOfCentralDir(int sizeOfCentralDir)
+
++ |
+
+ void |
+setTotNoOfEntriesInCentralDir(int totNoOfEntrisInCentralDir)
+
++ |
+
+ void |
+setTotNoOfEntriesInCentralDirOnThisDisk(int totNoOfEntriesInCentralDirOnThisDisk)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public EndCentralDirRecord()+
+Method Detail | +
---|
+public long getSignature()+
+public void setSignature(long signature)+
+public int getNoOfThisDisk()+
+public void setNoOfThisDisk(int noOfThisDisk)+
+public int getNoOfThisDiskStartOfCentralDir()+
+public void setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir)+
+public int getTotNoOfEntriesInCentralDirOnThisDisk()+
+public void setTotNoOfEntriesInCentralDirOnThisDisk(int totNoOfEntriesInCentralDirOnThisDisk)+
+public int getTotNoOfEntriesInCentralDir()+
+public void setTotNoOfEntriesInCentralDir(int totNoOfEntrisInCentralDir)+
+public int getSizeOfCentralDir()+
+public void setSizeOfCentralDir(int sizeOfCentralDir)+
+public long getOffsetOfStartOfCentralDir()+
+public void setOffsetOfStartOfCentralDir(long offSetOfStartOfCentralDir)+
+public int getCommentLength()+
+public void setCommentLength(int commentLength)+
+public String getComment()+
+public void setComment(String comment)+
+public byte[] getCommentBytes()+
+public void setCommentBytes(byte[] commentBytes)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.ExtraDataRecord ++
public class ExtraDataRecord
+
+Constructor Summary | +|
---|---|
ExtraDataRecord()
+
++ |
+
+Method Summary | +|
---|---|
+ byte[] |
+getData()
+
++ |
+
+ long |
+getHeader()
+
++ |
+
+ int |
+getSizeOfData()
+
++ |
+
+ void |
+setData(byte[] data)
+
++ |
+
+ void |
+setHeader(long header)
+
++ |
+
+ void |
+setSizeOfData(int sizeOfData)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ExtraDataRecord()+
+Method Detail | +
---|
+public long getHeader()+
+public void setHeader(long header)+
+public int getSizeOfData()+
+public void setSizeOfData(int sizeOfData)+
+public byte[] getData()+
+public void setData(byte[] data)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.FileHeader ++
public class FileHeader
+
+Constructor Summary | +|
---|---|
FileHeader()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+extractFile(ZipModel zipModel,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory |
+
+ void |
+extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters |
+
+ void |
+extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters. |
+
+ AESExtraDataRecord |
+getAesExtraDataRecord()
+
++ |
+
+ long |
+getCompressedSize()
+
++ |
+
+ int |
+getCompressionMethod()
+
++ |
+
+ long |
+getCrc32()
+
++ |
+
+ byte[] |
+getCrcBuff()
+
++ |
+
+ int |
+getDiskNumberStart()
+
++ |
+
+ int |
+getEncryptionMethod()
+
++ |
+
+ byte[] |
+getExternalFileAttr()
+
++ |
+
+ ArrayList |
+getExtraDataRecords()
+
++ |
+
+ int |
+getExtraFieldLength()
+
++ |
+
+ String |
+getFileComment()
+
++ |
+
+ int |
+getFileCommentLength()
+
++ |
+
+ String |
+getFileName()
+
++ |
+
+ int |
+getFileNameLength()
+
++ |
+
+ byte[] |
+getGeneralPurposeFlag()
+
++ |
+
+ byte[] |
+getInternalFileAttr()
+
++ |
+
+ int |
+getLastModFileTime()
+
++ |
+
+ long |
+getOffsetLocalHeader()
+
++ |
+
+ char[] |
+getPassword()
+
++ |
+
+ int |
+getSignature()
+
++ |
+
+ long |
+getUncompressedSize()
+
++ |
+
+ int |
+getVersionMadeBy()
+
++ |
+
+ int |
+getVersionNeededToExtract()
+
++ |
+
+ Zip64ExtendedInfo |
+getZip64ExtendedInfo()
+
++ |
+
+ boolean |
+isDataDescriptorExists()
+
++ |
+
+ boolean |
+isDirectory()
+
++ |
+
+ boolean |
+isEncrypted()
+
++ |
+
+ boolean |
+isFileNameUTF8Encoded()
+
++ |
+
+ void |
+setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)
+
++ |
+
+ void |
+setCompressedSize(long compressedSize)
+
++ |
+
+ void |
+setCompressionMethod(int compressionMethod)
+
++ |
+
+ void |
+setCrc32(long crc32)
+
++ |
+
+ void |
+setCrcBuff(byte[] crcBuff)
+
++ |
+
+ void |
+setDataDescriptorExists(boolean dataDescriptorExists)
+
++ |
+
+ void |
+setDirectory(boolean isDirectory)
+
++ |
+
+ void |
+setDiskNumberStart(int diskNumberStart)
+
++ |
+
+ void |
+setEncrypted(boolean isEncrypted)
+
++ |
+
+ void |
+setEncryptionMethod(int encryptionMethod)
+
++ |
+
+ void |
+setExternalFileAttr(byte[] externalFileAttr)
+
++ |
+
+ void |
+setExtraDataRecords(ArrayList extraDataRecords)
+
++ |
+
+ void |
+setExtraFieldLength(int extraFieldLength)
+
++ |
+
+ void |
+setFileComment(String fileComment)
+
++ |
+
+ void |
+setFileCommentLength(int fileCommentLength)
+
++ |
+
+ void |
+setFileName(String fileName)
+
++ |
+
+ void |
+setFileNameLength(int fileNameLength)
+
++ |
+
+ void |
+setFileNameUTF8Encoded(boolean fileNameUTF8Encoded)
+
++ |
+
+ void |
+setGeneralPurposeFlag(byte[] generalPurposeFlag)
+
++ |
+
+ void |
+setInternalFileAttr(byte[] internalFileAttr)
+
++ |
+
+ void |
+setLastModFileTime(int lastModFileTime)
+
++ |
+
+ void |
+setOffsetLocalHeader(long offsetLocalHeader)
+
++ |
+
+ void |
+setPassword(char[] password)
+
++ |
+
+ void |
+setSignature(int signature)
+
++ |
+
+ void |
+setUncompressedSize(long uncompressedSize)
+
++ |
+
+ void |
+setVersionMadeBy(int versionMadeBy)
+
++ |
+
+ void |
+setVersionNeededToExtract(int versionNeededToExtract)
+
++ |
+
+ void |
+setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public FileHeader()+
+Method Detail | +
---|
+public int getSignature()+
+public void setSignature(int signature)+
+public int getVersionMadeBy()+
+public void setVersionMadeBy(int versionMadeBy)+
+public int getVersionNeededToExtract()+
+public void setVersionNeededToExtract(int versionNeededToExtract)+
+public byte[] getGeneralPurposeFlag()+
+public void setGeneralPurposeFlag(byte[] generalPurposeFlag)+
+public int getCompressionMethod()+
+public void setCompressionMethod(int compressionMethod)+
+public int getLastModFileTime()+
+public void setLastModFileTime(int lastModFileTime)+
+public long getCrc32()+
+public void setCrc32(long crc32)+
+public long getCompressedSize()+
+public void setCompressedSize(long compressedSize)+
+public long getUncompressedSize()+
+public void setUncompressedSize(long uncompressedSize)+
+public int getFileNameLength()+
+public void setFileNameLength(int fileNameLength)+
+public int getExtraFieldLength()+
+public void setExtraFieldLength(int extraFieldLength)+
+public int getFileCommentLength()+
+public void setFileCommentLength(int fileCommentLength)+
+public int getDiskNumberStart()+
+public void setDiskNumberStart(int diskNumberStart)+
+public byte[] getInternalFileAttr()+
+public void setInternalFileAttr(byte[] internalFileAttr)+
+public byte[] getExternalFileAttr()+
+public void setExternalFileAttr(byte[] externalFileAttr)+
+public long getOffsetLocalHeader()+
+public void setOffsetLocalHeader(long offsetLocalHeader)+
+public String getFileName()+
+public void setFileName(String fileName)+
+public String getFileComment()+
+public void setFileComment(String fileComment)+
+public boolean isDirectory()+
+public void setDirectory(boolean isDirectory)+
+public void extractFile(ZipModel zipModel, + String outPath, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
+
zipModel
- outPath
-
+ZipException
+public void extractFile(ZipModel zipModel, + String outPath, + UnzipParameters unzipParameters, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
+
zipModel
- outPath
- unzipParameters
-
+ZipException
+public void extractFile(ZipModel zipModel, + String outPath, + UnzipParameters unzipParameters, + String newFileName, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
+
zipModel
- outPath
- unzipParameters
-
+ZipException
+public boolean isEncrypted()+
+public void setEncrypted(boolean isEncrypted)+
+public int getEncryptionMethod()+
+public void setEncryptionMethod(int encryptionMethod)+
+public char[] getPassword()+
+public void setPassword(char[] password)+
+public byte[] getCrcBuff()+
+public void setCrcBuff(byte[] crcBuff)+
+public ArrayList getExtraDataRecords()+
+public void setExtraDataRecords(ArrayList extraDataRecords)+
+public boolean isDataDescriptorExists()+
+public void setDataDescriptorExists(boolean dataDescriptorExists)+
+public Zip64ExtendedInfo getZip64ExtendedInfo()+
+public void setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)+
+public AESExtraDataRecord getAesExtraDataRecord()+
+public void setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)+
+public boolean isFileNameUTF8Encoded()+
+public void setFileNameUTF8Encoded(boolean fileNameUTF8Encoded)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.LocalFileHeader ++
public class LocalFileHeader
+
+Constructor Summary | +|
---|---|
LocalFileHeader()
+
++ |
+
+Method Summary | +|
---|---|
+ AESExtraDataRecord |
+getAesExtraDataRecord()
+
++ |
+
+ long |
+getCompressedSize()
+
++ |
+
+ int |
+getCompressionMethod()
+
++ |
+
+ long |
+getCrc32()
+
++ |
+
+ byte[] |
+getCrcBuff()
+
++ |
+
+ int |
+getEncryptionMethod()
+
++ |
+
+ ArrayList |
+getExtraDataRecords()
+
++ |
+
+ byte[] |
+getExtraField()
+
++ |
+
+ int |
+getExtraFieldLength()
+
++ |
+
+ String |
+getFileName()
+
++ |
+
+ int |
+getFileNameLength()
+
++ |
+
+ byte[] |
+getGeneralPurposeFlag()
+
++ |
+
+ int |
+getLastModFileTime()
+
++ |
+
+ long |
+getOffsetStartOfData()
+
++ |
+
+ char[] |
+getPassword()
+
++ |
+
+ int |
+getSignature()
+
++ |
+
+ long |
+getUncompressedSize()
+
++ |
+
+ int |
+getVersionNeededToExtract()
+
++ |
+
+ Zip64ExtendedInfo |
+getZip64ExtendedInfo()
+
++ |
+
+ boolean |
+isDataDescriptorExists()
+
++ |
+
+ boolean |
+isEncrypted()
+
++ |
+
+ boolean |
+isFileNameUTF8Encoded()
+
++ |
+
+ boolean |
+isWriteComprSizeInZip64ExtraRecord()
+
++ |
+
+ void |
+setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)
+
++ |
+
+ void |
+setCompressedSize(long compressedSize)
+
++ |
+
+ void |
+setCompressionMethod(int compressionMethod)
+
++ |
+
+ void |
+setCrc32(long crc32)
+
++ |
+
+ void |
+setCrcBuff(byte[] crcBuff)
+
++ |
+
+ void |
+setDataDescriptorExists(boolean dataDescriptorExists)
+
++ |
+
+ void |
+setEncrypted(boolean isEncrypted)
+
++ |
+
+ void |
+setEncryptionMethod(int encryptionMethod)
+
++ |
+
+ void |
+setExtraDataRecords(ArrayList extraDataRecords)
+
++ |
+
+ void |
+setExtraField(byte[] extraField)
+
++ |
+
+ void |
+setExtraFieldLength(int extraFieldLength)
+
++ |
+
+ void |
+setFileName(String fileName)
+
++ |
+
+ void |
+setFileNameLength(int fileNameLength)
+
++ |
+
+ void |
+setFileNameUTF8Encoded(boolean fileNameUTF8Encoded)
+
++ |
+
+ void |
+setGeneralPurposeFlag(byte[] generalPurposeFlag)
+
++ |
+
+ void |
+setLastModFileTime(int lastModFileTime)
+
++ |
+
+ void |
+setOffsetStartOfData(long offsetStartOfData)
+
++ |
+
+ void |
+setPassword(char[] password)
+
++ |
+
+ void |
+setSignature(int signature)
+
++ |
+
+ void |
+setUncompressedSize(long uncompressedSize)
+
++ |
+
+ void |
+setVersionNeededToExtract(int versionNeededToExtract)
+
++ |
+
+ void |
+setWriteComprSizeInZip64ExtraRecord(boolean writeComprSizeInZip64ExtraRecord)
+
++ |
+
+ void |
+setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public LocalFileHeader()+
+Method Detail | +
---|
+public int getSignature()+
+public void setSignature(int signature)+
+public int getVersionNeededToExtract()+
+public void setVersionNeededToExtract(int versionNeededToExtract)+
+public byte[] getGeneralPurposeFlag()+
+public void setGeneralPurposeFlag(byte[] generalPurposeFlag)+
+public int getCompressionMethod()+
+public void setCompressionMethod(int compressionMethod)+
+public int getLastModFileTime()+
+public void setLastModFileTime(int lastModFileTime)+
+public long getCrc32()+
+public void setCrc32(long crc32)+
+public long getCompressedSize()+
+public void setCompressedSize(long compressedSize)+
+public long getUncompressedSize()+
+public void setUncompressedSize(long uncompressedSize)+
+public int getFileNameLength()+
+public void setFileNameLength(int fileNameLength)+
+public int getExtraFieldLength()+
+public void setExtraFieldLength(int extraFieldLength)+
+public String getFileName()+
+public void setFileName(String fileName)+
+public byte[] getExtraField()+
+public void setExtraField(byte[] extraField)+
+public long getOffsetStartOfData()+
+public void setOffsetStartOfData(long offsetStartOfData)+
+public boolean isEncrypted()+
+public void setEncrypted(boolean isEncrypted)+
+public int getEncryptionMethod()+
+public void setEncryptionMethod(int encryptionMethod)+
+public byte[] getCrcBuff()+
+public void setCrcBuff(byte[] crcBuff)+
+public char[] getPassword()+
+public void setPassword(char[] password)+
+public ArrayList getExtraDataRecords()+
+public void setExtraDataRecords(ArrayList extraDataRecords)+
+public boolean isDataDescriptorExists()+
+public void setDataDescriptorExists(boolean dataDescriptorExists)+
+public Zip64ExtendedInfo getZip64ExtendedInfo()+
+public void setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)+
+public AESExtraDataRecord getAesExtraDataRecord()+
+public void setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)+
+public boolean isWriteComprSizeInZip64ExtraRecord()+
+public void setWriteComprSizeInZip64ExtraRecord(boolean writeComprSizeInZip64ExtraRecord)+
+public boolean isFileNameUTF8Encoded()+
+public void setFileNameUTF8Encoded(boolean fileNameUTF8Encoded)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.UnzipEngineParameters ++
public class UnzipEngineParameters
+
+Constructor Summary | +|
---|---|
UnzipEngineParameters()
+
++ |
+
+Method Summary | +|
---|---|
+ FileHeader |
+getFileHeader()
+
++ |
+
+ IDecrypter |
+getIDecryptor()
+
++ |
+
+ LocalFileHeader |
+getLocalFileHeader()
+
++ |
+
+ FileOutputStream |
+getOutputStream()
+
++ |
+
+ UnzipEngine |
+getUnzipEngine()
+
++ |
+
+ ZipModel |
+getZipModel()
+
++ |
+
+ void |
+setFileHeader(FileHeader fileHeader)
+
++ |
+
+ void |
+setIDecryptor(IDecrypter decrypter)
+
++ |
+
+ void |
+setLocalFileHeader(LocalFileHeader localFileHeader)
+
++ |
+
+ void |
+setOutputStream(FileOutputStream outputStream)
+
++ |
+
+ void |
+setUnzipEngine(UnzipEngine unzipEngine)
+
++ |
+
+ void |
+setZipModel(ZipModel zipModel)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UnzipEngineParameters()+
+Method Detail | +
---|
+public ZipModel getZipModel()+
+public void setZipModel(ZipModel zipModel)+
+public FileHeader getFileHeader()+
+public void setFileHeader(FileHeader fileHeader)+
+public LocalFileHeader getLocalFileHeader()+
+public void setLocalFileHeader(LocalFileHeader localFileHeader)+
+public IDecrypter getIDecryptor()+
+public void setIDecryptor(IDecrypter decrypter)+
+public FileOutputStream getOutputStream()+
+public void setOutputStream(FileOutputStream outputStream)+
+public UnzipEngine getUnzipEngine()+
+public void setUnzipEngine(UnzipEngine unzipEngine)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.UnzipParameters ++
public class UnzipParameters
+
+Constructor Summary | +|
---|---|
UnzipParameters()
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+isIgnoreAllFileAttributes()
+
++ |
+
+ boolean |
+isIgnoreArchiveFileAttribute()
+
++ |
+
+ boolean |
+isIgnoreDateTimeAttributes()
+
++ |
+
+ boolean |
+isIgnoreHiddenFileAttribute()
+
++ |
+
+ boolean |
+isIgnoreReadOnlyFileAttribute()
+
++ |
+
+ boolean |
+isIgnoreSystemFileAttribute()
+
++ |
+
+ void |
+setIgnoreAllFileAttributes(boolean ignoreAllFileAttributes)
+
++ |
+
+ void |
+setIgnoreArchiveFileAttribute(boolean ignoreArchiveFileAttribute)
+
++ |
+
+ void |
+setIgnoreDateTimeAttributes(boolean ignoreDateTimeAttributes)
+
++ |
+
+ void |
+setIgnoreHiddenFileAttribute(boolean ignoreHiddenFileAttribute)
+
++ |
+
+ void |
+setIgnoreReadOnlyFileAttribute(boolean ignoreReadOnlyFileAttribute)
+
++ |
+
+ void |
+setIgnoreSystemFileAttribute(boolean ignoreSystemFileAttribute)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UnzipParameters()+
+Method Detail | +
---|
+public boolean isIgnoreReadOnlyFileAttribute()+
+public void setIgnoreReadOnlyFileAttribute(boolean ignoreReadOnlyFileAttribute)+
+public boolean isIgnoreHiddenFileAttribute()+
+public void setIgnoreHiddenFileAttribute(boolean ignoreHiddenFileAttribute)+
+public boolean isIgnoreArchiveFileAttribute()+
+public void setIgnoreArchiveFileAttribute(boolean ignoreArchiveFileAttribute)+
+public boolean isIgnoreSystemFileAttribute()+
+public void setIgnoreSystemFileAttribute(boolean ignoreSystemFileAttribute)+
+public boolean isIgnoreAllFileAttributes()+
+public void setIgnoreAllFileAttributes(boolean ignoreAllFileAttributes)+
+public boolean isIgnoreDateTimeAttributes()+
+public void setIgnoreDateTimeAttributes(boolean ignoreDateTimeAttributes)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.Zip64EndCentralDirLocator ++
public class Zip64EndCentralDirLocator
+
+Constructor Summary | +|
---|---|
Zip64EndCentralDirLocator()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+getNoOfDiskStartOfZip64EndOfCentralDirRec()
+
++ |
+
+ long |
+getOffsetZip64EndOfCentralDirRec()
+
++ |
+
+ long |
+getSignature()
+
++ |
+
+ int |
+getTotNumberOfDiscs()
+
++ |
+
+ void |
+setNoOfDiskStartOfZip64EndOfCentralDirRec(int noOfDiskStartOfZip64EndOfCentralDirRec)
+
++ |
+
+ void |
+setOffsetZip64EndOfCentralDirRec(long offsetZip64EndOfCentralDirRec)
+
++ |
+
+ void |
+setSignature(long signature)
+
++ |
+
+ void |
+setTotNumberOfDiscs(int totNumberOfDiscs)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Zip64EndCentralDirLocator()+
+Method Detail | +
---|
+public long getSignature()+
+public void setSignature(long signature)+
+public int getNoOfDiskStartOfZip64EndOfCentralDirRec()+
+public void setNoOfDiskStartOfZip64EndOfCentralDirRec(int noOfDiskStartOfZip64EndOfCentralDirRec)+
+public long getOffsetZip64EndOfCentralDirRec()+
+public void setOffsetZip64EndOfCentralDirRec(long offsetZip64EndOfCentralDirRec)+
+public int getTotNumberOfDiscs()+
+public void setTotNumberOfDiscs(int totNumberOfDiscs)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.Zip64EndCentralDirRecord ++
public class Zip64EndCentralDirRecord
+
+Constructor Summary | +|
---|---|
Zip64EndCentralDirRecord()
+
++ |
+
+Method Summary | +|
---|---|
+ byte[] |
+getExtensibleDataSector()
+
++ |
+
+ int |
+getNoOfThisDisk()
+
++ |
+
+ int |
+getNoOfThisDiskStartOfCentralDir()
+
++ |
+
+ long |
+getOffsetStartCenDirWRTStartDiskNo()
+
++ |
+
+ long |
+getSignature()
+
++ |
+
+ long |
+getSizeOfCentralDir()
+
++ |
+
+ long |
+getSizeOfZip64EndCentralDirRec()
+
++ |
+
+ long |
+getTotNoOfEntriesInCentralDir()
+
++ |
+
+ long |
+getTotNoOfEntriesInCentralDirOnThisDisk()
+
++ |
+
+ int |
+getVersionMadeBy()
+
++ |
+
+ int |
+getVersionNeededToExtract()
+
++ |
+
+ void |
+setExtensibleDataSector(byte[] extensibleDataSector)
+
++ |
+
+ void |
+setNoOfThisDisk(int noOfThisDisk)
+
++ |
+
+ void |
+setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir)
+
++ |
+
+ void |
+setOffsetStartCenDirWRTStartDiskNo(long offsetStartCenDirWRTStartDiskNo)
+
++ |
+
+ void |
+setSignature(long signature)
+
++ |
+
+ void |
+setSizeOfCentralDir(long sizeOfCentralDir)
+
++ |
+
+ void |
+setSizeOfZip64EndCentralDirRec(long sizeOfZip64EndCentralDirRec)
+
++ |
+
+ void |
+setTotNoOfEntriesInCentralDir(long totNoOfEntriesInCentralDir)
+
++ |
+
+ void |
+setTotNoOfEntriesInCentralDirOnThisDisk(long totNoOfEntriesInCentralDirOnThisDisk)
+
++ |
+
+ void |
+setVersionMadeBy(int versionMadeBy)
+
++ |
+
+ void |
+setVersionNeededToExtract(int versionNeededToExtract)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Zip64EndCentralDirRecord()+
+Method Detail | +
---|
+public long getSignature()+
+public void setSignature(long signature)+
+public long getSizeOfZip64EndCentralDirRec()+
+public void setSizeOfZip64EndCentralDirRec(long sizeOfZip64EndCentralDirRec)+
+public int getVersionMadeBy()+
+public void setVersionMadeBy(int versionMadeBy)+
+public int getVersionNeededToExtract()+
+public void setVersionNeededToExtract(int versionNeededToExtract)+
+public int getNoOfThisDisk()+
+public void setNoOfThisDisk(int noOfThisDisk)+
+public int getNoOfThisDiskStartOfCentralDir()+
+public void setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir)+
+public long getTotNoOfEntriesInCentralDirOnThisDisk()+
+public void setTotNoOfEntriesInCentralDirOnThisDisk(long totNoOfEntriesInCentralDirOnThisDisk)+
+public long getTotNoOfEntriesInCentralDir()+
+public void setTotNoOfEntriesInCentralDir(long totNoOfEntriesInCentralDir)+
+public long getSizeOfCentralDir()+
+public void setSizeOfCentralDir(long sizeOfCentralDir)+
+public long getOffsetStartCenDirWRTStartDiskNo()+
+public void setOffsetStartCenDirWRTStartDiskNo(long offsetStartCenDirWRTStartDiskNo)+
+public byte[] getExtensibleDataSector()+
+public void setExtensibleDataSector(byte[] extensibleDataSector)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.Zip64ExtendedInfo ++
public class Zip64ExtendedInfo
+
+Constructor Summary | +|
---|---|
Zip64ExtendedInfo()
+
++ |
+
+Method Summary | +|
---|---|
+ long |
+getCompressedSize()
+
++ |
+
+ int |
+getDiskNumberStart()
+
++ |
+
+ int |
+getHeader()
+
++ |
+
+ long |
+getOffsetLocalHeader()
+
++ |
+
+ int |
+getSize()
+
++ |
+
+ long |
+getUnCompressedSize()
+
++ |
+
+ void |
+setCompressedSize(long compressedSize)
+
++ |
+
+ void |
+setDiskNumberStart(int diskNumberStart)
+
++ |
+
+ void |
+setHeader(int header)
+
++ |
+
+ void |
+setOffsetLocalHeader(long offsetLocalHeader)
+
++ |
+
+ void |
+setSize(int size)
+
++ |
+
+ void |
+setUnCompressedSize(long unCompressedSize)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Zip64ExtendedInfo()+
+Method Detail | +
---|
+public int getHeader()+
+public void setHeader(int header)+
+public int getSize()+
+public void setSize(int size)+
+public long getCompressedSize()+
+public void setCompressedSize(long compressedSize)+
+public long getUnCompressedSize()+
+public void setUnCompressedSize(long unCompressedSize)+
+public long getOffsetLocalHeader()+
+public void setOffsetLocalHeader(long offsetLocalHeader)+
+public int getDiskNumberStart()+
+public void setDiskNumberStart(int diskNumberStart)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.ZipModel ++
public class ZipModel
+
+Constructor Summary | +|
---|---|
ZipModel()
+
++ |
+
+Method Summary | +|
---|---|
+ Object |
+clone()
+
++ |
+
+ ArchiveExtraDataRecord |
+getArchiveExtraDataRecord()
+
++ |
+
+ CentralDirectory |
+getCentralDirectory()
+
++ |
+
+ List |
+getDataDescriptorList()
+
++ |
+
+ long |
+getEnd()
+
++ |
+
+ EndCentralDirRecord |
+getEndCentralDirRecord()
+
++ |
+
+ String |
+getFileNameCharset()
+
++ |
+
+ List |
+getLocalFileHeaderList()
+
++ |
+
+ long |
+getSplitLength()
+
++ |
+
+ long |
+getStart()
+
++ |
+
+ Zip64EndCentralDirLocator |
+getZip64EndCentralDirLocator()
+
++ |
+
+ Zip64EndCentralDirRecord |
+getZip64EndCentralDirRecord()
+
++ |
+
+ String |
+getZipFile()
+
++ |
+
+ boolean |
+isNestedZipFile()
+
++ |
+
+ boolean |
+isSplitArchive()
+
++ |
+
+ boolean |
+isZip64Format()
+
++ |
+
+ void |
+setArchiveExtraDataRecord(ArchiveExtraDataRecord archiveExtraDataRecord)
+
++ |
+
+ void |
+setCentralDirectory(CentralDirectory centralDirectory)
+
++ |
+
+ void |
+setDataDescriptorList(List dataDescriptorList)
+
++ |
+
+ void |
+setEnd(long end)
+
++ |
+
+ void |
+setEndCentralDirRecord(EndCentralDirRecord endCentralDirRecord)
+
++ |
+
+ void |
+setFileNameCharset(String fileNameCharset)
+
++ |
+
+ void |
+setLocalFileHeaderList(List localFileHeaderList)
+
++ |
+
+ void |
+setNestedZipFile(boolean isNestedZipFile)
+
++ |
+
+ void |
+setSplitArchive(boolean splitArchive)
+
++ |
+
+ void |
+setSplitLength(long splitLength)
+
++ |
+
+ void |
+setStart(long start)
+
++ |
+
+ void |
+setZip64EndCentralDirLocator(Zip64EndCentralDirLocator zip64EndCentralDirLocator)
+
++ |
+
+ void |
+setZip64EndCentralDirRecord(Zip64EndCentralDirRecord zip64EndCentralDirRecord)
+
++ |
+
+ void |
+setZip64Format(boolean isZip64Format)
+
++ |
+
+ void |
+setZipFile(String zipFile)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipModel()+
+Method Detail | +
---|
+public List getLocalFileHeaderList()+
+public void setLocalFileHeaderList(List localFileHeaderList)+
+public List getDataDescriptorList()+
+public void setDataDescriptorList(List dataDescriptorList)+
+public CentralDirectory getCentralDirectory()+
+public void setCentralDirectory(CentralDirectory centralDirectory)+
+public EndCentralDirRecord getEndCentralDirRecord()+
+public void setEndCentralDirRecord(EndCentralDirRecord endCentralDirRecord)+
+public ArchiveExtraDataRecord getArchiveExtraDataRecord()+
+public void setArchiveExtraDataRecord(ArchiveExtraDataRecord archiveExtraDataRecord)+
+public boolean isSplitArchive()+
+public void setSplitArchive(boolean splitArchive)+
+public String getZipFile()+
+public void setZipFile(String zipFile)+
+public Zip64EndCentralDirLocator getZip64EndCentralDirLocator()+
+public void setZip64EndCentralDirLocator(Zip64EndCentralDirLocator zip64EndCentralDirLocator)+
+public Zip64EndCentralDirRecord getZip64EndCentralDirRecord()+
+public void setZip64EndCentralDirRecord(Zip64EndCentralDirRecord zip64EndCentralDirRecord)+
+public boolean isZip64Format()+
+public void setZip64Format(boolean isZip64Format)+
+public boolean isNestedZipFile()+
+public void setNestedZipFile(boolean isNestedZipFile)+
+public long getStart()+
+public void setStart(long start)+
+public long getEnd()+
+public void setEnd(long end)+
+public long getSplitLength()+
+public void setSplitLength(long splitLength)+
+public Object clone() + throws CloneNotSupportedException+
clone
in class Object
CloneNotSupportedException
+public String getFileNameCharset()+
+public void setFileNameCharset(String fileNameCharset)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.model.ZipParameters ++
public class ZipParameters
+
+Constructor Summary | +|
---|---|
ZipParameters()
+
++ |
+
+Method Summary | +|
---|---|
+ Object |
+clone()
+
++ |
+
+ int |
+getAesKeyStrength()
+
++ |
+
+ int |
+getCompressionLevel()
+
++ |
+
+ int |
+getCompressionMethod()
+
++ |
+
+ String |
+getDefaultFolderPath()
+
++ |
+
+ int |
+getEncryptionMethod()
+
++ |
+
+ String |
+getFileNameInZip()
+
++ |
+
+ char[] |
+getPassword()
+
++ |
+
+ String |
+getRootFolderInZip()
+
++ |
+
+ int |
+getSourceFileCRC()
+
++ |
+
+ TimeZone |
+getTimeZone()
+
++ |
+
+ boolean |
+isEncryptFiles()
+
++ |
+
+ boolean |
+isIncludeRootFolder()
+
++ |
+
+ boolean |
+isReadHiddenFiles()
+
++ |
+
+ boolean |
+isSourceExternalStream()
+
++ |
+
+ void |
+setAesKeyStrength(int aesKeyStrength)
+
++ |
+
+ void |
+setCompressionLevel(int compressionLevel)
+
++ |
+
+ void |
+setCompressionMethod(int compressionMethod)
+
++ |
+
+ void |
+setDefaultFolderPath(String defaultFolderPath)
+
++ |
+
+ void |
+setEncryptFiles(boolean encryptFiles)
+
++ |
+
+ void |
+setEncryptionMethod(int encryptionMethod)
+
++ |
+
+ void |
+setFileNameInZip(String fileNameInZip)
+
++ |
+
+ void |
+setIncludeRootFolder(boolean includeRootFolder)
+
++ |
+
+ void |
+setPassword(char[] password)
+
++ |
+
+ void |
+setPassword(String password)
+
++ Sets the password for the zip file or the file being added + Note: For security reasons, usage of this method is discouraged. |
+
+ void |
+setReadHiddenFiles(boolean readHiddenFiles)
+
++ |
+
+ void |
+setRootFolderInZip(String rootFolderInZip)
+
++ |
+
+ void |
+setSourceExternalStream(boolean isSourceExternalStream)
+
++ |
+
+ void |
+setSourceFileCRC(int sourceFileCRC)
+
++ |
+
+ void |
+setTimeZone(TimeZone timeZone)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipParameters()+
+Method Detail | +
---|
+public int getCompressionMethod()+
+public void setCompressionMethod(int compressionMethod)+
+public boolean isEncryptFiles()+
+public void setEncryptFiles(boolean encryptFiles)+
+public int getEncryptionMethod()+
+public void setEncryptionMethod(int encryptionMethod)+
+public int getCompressionLevel()+
+public void setCompressionLevel(int compressionLevel)+
+public boolean isReadHiddenFiles()+
+public void setReadHiddenFiles(boolean readHiddenFiles)+
+public Object clone() + throws CloneNotSupportedException+
clone
in class Object
CloneNotSupportedException
+public char[] getPassword()+
+public void setPassword(String password)+
+
password
- +public void setPassword(char[] password)+
+public int getAesKeyStrength()+
+public void setAesKeyStrength(int aesKeyStrength)+
+public boolean isIncludeRootFolder()+
+public void setIncludeRootFolder(boolean includeRootFolder)+
+public String getRootFolderInZip()+
+public void setRootFolderInZip(String rootFolderInZip)+
+public TimeZone getTimeZone()+
+public void setTimeZone(TimeZone timeZone)+
+public int getSourceFileCRC()+
+public void setSourceFileCRC(int sourceFileCRC)+
+public String getDefaultFolderPath()+
+public void setDefaultFolderPath(String defaultFolderPath)+
+public String getFileNameInZip()+
+public void setFileNameInZip(String fileNameInZip)+
+public boolean isSourceExternalStream()+
+public void setSourceExternalStream(boolean isSourceExternalStream)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use AESExtraDataRecord | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of AESExtraDataRecord in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return AESExtraDataRecord | +|
---|---|
+ AESExtraDataRecord |
+LocalFileHeader.getAesExtraDataRecord()
+
++ |
+
+ AESExtraDataRecord |
+FileHeader.getAesExtraDataRecord()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type AESExtraDataRecord | +|
---|---|
+ void |
+LocalFileHeader.setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)
+
++ |
+
+ void |
+FileHeader.setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use ArchiveExtraDataRecord | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of ArchiveExtraDataRecord in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return ArchiveExtraDataRecord | +|
---|---|
+ ArchiveExtraDataRecord |
+ZipModel.getArchiveExtraDataRecord()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type ArchiveExtraDataRecord | +|
---|---|
+ void |
+ZipModel.setArchiveExtraDataRecord(ArchiveExtraDataRecord archiveExtraDataRecord)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use CentralDirectory | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of CentralDirectory in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return CentralDirectory | +|
---|---|
+ CentralDirectory |
+ZipModel.getCentralDirectory()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type CentralDirectory | +|
---|---|
+ void |
+ZipModel.setCentralDirectory(CentralDirectory centralDirectory)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use DigitalSignature | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of DigitalSignature in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return DigitalSignature | +|
---|---|
+ DigitalSignature |
+CentralDirectory.getDigitalSignature()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type DigitalSignature | +|
---|---|
+ void |
+CentralDirectory.setDigitalSignature(DigitalSignature digitalSignature)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use EndCentralDirRecord | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of EndCentralDirRecord in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return EndCentralDirRecord | +|
---|---|
+ EndCentralDirRecord |
+ZipModel.getEndCentralDirRecord()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type EndCentralDirRecord | +|
---|---|
+ void |
+ZipModel.setEndCentralDirRecord(EndCentralDirRecord endCentralDirRecord)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use FileHeader | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
+Uses of FileHeader in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core that return FileHeader | +|
---|---|
+ FileHeader |
+ZipFile.getFileHeader(String fileName)
+
++ Returns FileHeader if a file header with the given fileHeader + string exists in the zip model: If not returns null |
+
+ +
Methods in net.lingala.zip4j.core with parameters of type FileHeader | +|
---|---|
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ ZipInputStream |
+ZipFile.getInputStream(FileHeader fileHeader)
+
++ Returns an input stream for reading the contents of the Zip file corresponding + to the input FileHeader. |
+
+ LocalFileHeader |
+HeaderReader.readLocalFileHeader(FileHeader fileHeader)
+
++ Reads local file header for the given file header |
+
+ void |
+ZipFile.removeFile(FileHeader fileHeader)
+
++ Removes the file provided in the input file header from the zip file. |
+
+Uses of FileHeader in net.lingala.zip4j.crypto | +
---|
+ +
Constructors in net.lingala.zip4j.crypto with parameters of type FileHeader | +|
---|---|
StandardDecrypter(FileHeader fileHeader,
+ byte[] headerBytes)
+
++ |
+
+Uses of FileHeader in net.lingala.zip4j.io | +
---|
+ +
Fields in net.lingala.zip4j.io declared as FileHeader | +|
---|---|
+protected FileHeader |
+CipherOutputStream.fileHeader
+
++ |
+
+Uses of FileHeader in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return FileHeader | +|
---|---|
+ FileHeader |
+UnzipEngineParameters.getFileHeader()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type FileHeader | +|
---|---|
+ void |
+UnzipEngineParameters.setFileHeader(FileHeader fileHeader)
+
++ |
+
+Uses of FileHeader in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip that return FileHeader | +|
---|---|
+ FileHeader |
+UnzipEngine.getFileHeader()
+
++ |
+
+ +
Methods in net.lingala.zip4j.unzip with parameters of type FileHeader | +|
---|---|
+static void |
+UnzipUtil.applyFileAttributes(FileHeader fileHeader,
+ File file)
+
++ |
+
+static void |
+UnzipUtil.applyFileAttributes(FileHeader fileHeader,
+ File file,
+ UnzipParameters unzipParameters)
+
++ |
+
+ void |
+Unzip.extractFile(FileHeader fileHeader,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ ZipInputStream |
+Unzip.getInputStream(FileHeader fileHeader)
+
++ |
+
+ +
Constructors in net.lingala.zip4j.unzip with parameters of type FileHeader | +|
---|---|
UnzipEngine(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+Uses of FileHeader in net.lingala.zip4j.util | +
---|
+ +
Methods in net.lingala.zip4j.util that return FileHeader | +|
---|---|
+static FileHeader |
+Zip4jUtil.getFileHeader(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static FileHeader |
+Zip4jUtil.getFileHeaderWithExactMatch(ZipModel zipModel,
+ String fileName)
+
++ |
+
+ +
Methods in net.lingala.zip4j.util with parameters of type FileHeader | +|
---|---|
+static int |
+Zip4jUtil.getIndexOfFileHeader(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForRemoveOp(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ HashMap |
+ArchiveMaintainer.initRemoveZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ HashMap |
+ArchiveMaintainer.removeZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use LocalFileHeader | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
+Uses of LocalFileHeader in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core that return LocalFileHeader | +|
---|---|
+ LocalFileHeader |
+HeaderReader.readLocalFileHeader(FileHeader fileHeader)
+
++ Reads local file header for the given file header |
+
+ +
Methods in net.lingala.zip4j.core with parameters of type LocalFileHeader | +|
---|---|
+ void |
+HeaderWriter.updateLocalFileHeader(LocalFileHeader localFileHeader,
+ long offset,
+ int toUpdate,
+ ZipModel zipModel,
+ byte[] bytesToWrite,
+ int noOfDisk,
+ SplitOutputStream outputStream)
+
++ |
+
+ int |
+HeaderWriter.writeExtendedLocalHeader(LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
+ int |
+HeaderWriter.writeLocalFileHeader(ZipModel zipModel,
+ LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
+Uses of LocalFileHeader in net.lingala.zip4j.crypto | +
---|
+ +
Constructors in net.lingala.zip4j.crypto with parameters of type LocalFileHeader | +|
---|---|
AESDecrypter(LocalFileHeader localFileHeader,
+ byte[] salt,
+ byte[] passwordVerifier)
+
++ |
+
+Uses of LocalFileHeader in net.lingala.zip4j.io | +
---|
+ +
Fields in net.lingala.zip4j.io declared as LocalFileHeader | +|
---|---|
+protected LocalFileHeader |
+CipherOutputStream.localFileHeader
+
++ |
+
+Uses of LocalFileHeader in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return LocalFileHeader | +|
---|---|
+ LocalFileHeader |
+UnzipEngineParameters.getLocalFileHeader()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type LocalFileHeader | +|
---|---|
+ void |
+UnzipEngineParameters.setLocalFileHeader(LocalFileHeader localFileHeader)
+
++ |
+
+Uses of LocalFileHeader in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip that return LocalFileHeader | +|
---|---|
+ LocalFileHeader |
+UnzipEngine.getLocalFileHeader()
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use UnzipParameters | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
+Uses of UnzipParameters in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core with parameters of type UnzipParameters | +|
---|---|
+ void |
+ZipFile.extractAll(String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts all the files in the given zip file to the input destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(FileHeader fileHeader,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(String fileName,
+ String destPath,
+ UnzipParameters unzipParameters)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+ void |
+ZipFile.extractFile(String fileName,
+ String destPath,
+ UnzipParameters unzipParameters,
+ String newFileName)
+
++ Extracts a specific file from the zip file to the destination path. |
+
+Uses of UnzipParameters in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model with parameters of type UnzipParameters | +|
---|---|
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters. |
+
+Uses of UnzipParameters in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip with parameters of type UnzipParameters | +|
---|---|
+static void |
+UnzipUtil.applyFileAttributes(FileHeader fileHeader,
+ File file,
+ UnzipParameters unzipParameters)
+
++ |
+
+ void |
+Unzip.extractAll(UnzipParameters unzipParameters,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+Unzip.extractFile(FileHeader fileHeader,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+UnzipEngine.unzipFile(ProgressMonitor progressMonitor,
+ String outPath,
+ String newFileName,
+ UnzipParameters unzipParameters)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use Zip64EndCentralDirLocator | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of Zip64EndCentralDirLocator in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return Zip64EndCentralDirLocator | +|
---|---|
+ Zip64EndCentralDirLocator |
+ZipModel.getZip64EndCentralDirLocator()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type Zip64EndCentralDirLocator | +|
---|---|
+ void |
+ZipModel.setZip64EndCentralDirLocator(Zip64EndCentralDirLocator zip64EndCentralDirLocator)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use Zip64EndCentralDirRecord | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of Zip64EndCentralDirRecord in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return Zip64EndCentralDirRecord | +|
---|---|
+ Zip64EndCentralDirRecord |
+ZipModel.getZip64EndCentralDirRecord()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type Zip64EndCentralDirRecord | +|
---|---|
+ void |
+ZipModel.setZip64EndCentralDirRecord(Zip64EndCentralDirRecord zip64EndCentralDirRecord)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use Zip64ExtendedInfo | +|
---|---|
net.lingala.zip4j.model | ++ |
+Uses of Zip64ExtendedInfo in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return Zip64ExtendedInfo | +|
---|---|
+ Zip64ExtendedInfo |
+LocalFileHeader.getZip64ExtendedInfo()
+
++ |
+
+ Zip64ExtendedInfo |
+FileHeader.getZip64ExtendedInfo()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type Zip64ExtendedInfo | +|
---|---|
+ void |
+LocalFileHeader.setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)
+
++ |
+
+ void |
+FileHeader.setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use ZipModel | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+Uses of ZipModel in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core that return ZipModel | +|
---|---|
+ ZipModel |
+HeaderReader.readAllHeaders()
+
++ Reads all the header information for the zip file. |
+
+ ZipModel |
+HeaderReader.readAllHeaders(String fileNameCharset)
+
++ Reads all the header information for the zip file. |
+
+ +
Methods in net.lingala.zip4j.core with parameters of type ZipModel | +|
---|---|
+ void |
+HeaderWriter.finalizeZipFile(ZipModel zipModel,
+ OutputStream outputStream)
+
++ Processes zip header data and writes this data to the zip file |
+
+ void |
+HeaderWriter.finalizeZipFileWithoutValidations(ZipModel zipModel,
+ OutputStream outputStream)
+
++ Processes zip header data and writes this data to the zip file without any validations. |
+
+ void |
+HeaderWriter.updateLocalFileHeader(LocalFileHeader localFileHeader,
+ long offset,
+ int toUpdate,
+ ZipModel zipModel,
+ byte[] bytesToWrite,
+ int noOfDisk,
+ SplitOutputStream outputStream)
+
++ |
+
+ int |
+HeaderWriter.writeLocalFileHeader(ZipModel zipModel,
+ LocalFileHeader localFileHeader,
+ OutputStream outputStream)
+
++ |
+
+Uses of ZipModel in net.lingala.zip4j.io | +
---|
+ +
Fields in net.lingala.zip4j.io declared as ZipModel | +|
---|---|
+protected ZipModel |
+CipherOutputStream.zipModel
+
++ |
+
+ +
Constructors in net.lingala.zip4j.io with parameters of type ZipModel | +|
---|---|
CipherOutputStream(OutputStream outputStream,
+ ZipModel zipModel)
+
++ |
+|
DeflaterOutputStream(OutputStream outputStream,
+ ZipModel zipModel)
+
++ |
+|
ZipOutputStream(OutputStream outputStream,
+ ZipModel zipModel)
+
++ |
+
+Uses of ZipModel in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return ZipModel | +|
---|---|
+ ZipModel |
+UnzipEngineParameters.getZipModel()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type ZipModel | +|
---|---|
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters. |
+
+ void |
+UnzipEngineParameters.setZipModel(ZipModel zipModel)
+
++ |
+
+Uses of ZipModel in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip that return ZipModel | +|
---|---|
+ ZipModel |
+UnzipEngine.getZipModel()
+
++ |
+
+ +
Constructors in net.lingala.zip4j.unzip with parameters of type ZipModel | +|
---|---|
Unzip(ZipModel zipModel)
+
++ |
+|
UnzipEngine(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+Uses of ZipModel in net.lingala.zip4j.util | +
---|
+ +
Methods in net.lingala.zip4j.util with parameters of type ZipModel | +|
---|---|
+static FileHeader |
+Zip4jUtil.getFileHeader(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static FileHeader |
+Zip4jUtil.getFileHeaderWithExactMatch(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static int |
+Zip4jUtil.getIndexOfFileHeader(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+static ArrayList |
+Zip4jUtil.getSplitZipFiles(ZipModel zipModel)
+
++ |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForMergeOp(ZipModel zipModel,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForRemoveOp(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ HashMap |
+ArchiveMaintainer.initRemoveZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+ArchiveMaintainer.mergeSplitZipFiles(ZipModel zipModel,
+ File outputZipFile,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Merges split Zip files into a single Zip file |
+
+ HashMap |
+ArchiveMaintainer.removeZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ArchiveMaintainer.setComment(ZipModel zipModel,
+ String comment)
+
++ |
+
+Uses of ZipModel in net.lingala.zip4j.zip | +
---|
+ +
Constructors in net.lingala.zip4j.zip with parameters of type ZipModel | +|
---|---|
ZipEngine(ZipModel zipModel)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use ZipParameters | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.zip | ++ |
+Uses of ZipParameters in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core with parameters of type ZipParameters | +|
---|---|
+ void |
+ZipFile.addFile(File sourceFile,
+ ZipParameters parameters)
+
++ Adds input source file to the zip file. |
+
+ void |
+ZipFile.addFiles(ArrayList sourceFileList,
+ ZipParameters parameters)
+
++ Adds the list of input files to the zip file. |
+
+ void |
+ZipFile.addFolder(File path,
+ ZipParameters parameters)
+
++ Adds the folder in the given file object to the zip file. |
+
+ void |
+ZipFile.addFolder(String path,
+ ZipParameters parameters)
+
++ Adds the folder in the given path to the zip file. |
+
+ void |
+ZipFile.addStream(InputStream inputStream,
+ ZipParameters parameters)
+
++ Creates a new entry in the zip file and adds the content of the inputstream to the + zip file. |
+
+ void |
+ZipFile.createZipFile(ArrayList sourceFileList,
+ ZipParameters parameters)
+
++ Creates a zip file and adds the list of source file(s) to the zip file. |
+
+ void |
+ZipFile.createZipFile(ArrayList sourceFileList,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the list of source file(s) to the zip file. |
+
+ void |
+ZipFile.createZipFile(File sourceFile,
+ ZipParameters parameters)
+
++ Creates a zip file and adds the source file to the zip file. |
+
+ void |
+ZipFile.createZipFile(File sourceFile,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the source file to the zip file. |
+
+ void |
+ZipFile.createZipFileFromFolder(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.createZipFileFromFolder(String folderToAdd,
+ ZipParameters parameters,
+ boolean splitArchive,
+ long splitLength)
+
++ Creates a zip file and adds the files/folders from the specified folder to the zip file. |
+
+Uses of ZipParameters in net.lingala.zip4j.io | +
---|
+ +
Fields in net.lingala.zip4j.io declared as ZipParameters | +|
---|---|
+protected ZipParameters |
+CipherOutputStream.zipParameters
+
++ |
+
+ +
Methods in net.lingala.zip4j.io with parameters of type ZipParameters | +|
---|---|
+ void |
+DeflaterOutputStream.putNextEntry(File file,
+ ZipParameters zipParameters)
+
++ |
+
+ void |
+CipherOutputStream.putNextEntry(File file,
+ ZipParameters zipParameters)
+
++ |
+
+Uses of ZipParameters in net.lingala.zip4j.zip | +
---|
+ +
Methods in net.lingala.zip4j.zip with parameters of type ZipParameters | +|
---|---|
+ void |
+ZipEngine.addFiles(ArrayList fileList,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ZipEngine.addFolderToZip(File file,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ZipEngine.addStreamToZip(InputStream inputStream,
+ ZipParameters parameters)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +AESExtraDataRecord + +ArchiveExtraDataRecord + +CentralDirectory + +DataDescriptor + +DigitalSignature + +EndCentralDirRecord + +ExtraDataRecord + +FileHeader + +LocalFileHeader + +UnzipEngineParameters + +UnzipParameters + +Zip64EndCentralDirLocator + +Zip64EndCentralDirRecord + +Zip64ExtendedInfo + +ZipModel + +ZipParameters |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
AESExtraDataRecord | ++ |
ArchiveExtraDataRecord | ++ |
CentralDirectory | ++ |
DataDescriptor | ++ |
DigitalSignature | ++ |
EndCentralDirRecord | ++ |
ExtraDataRecord | ++ |
FileHeader | ++ |
LocalFileHeader | ++ |
UnzipEngineParameters | ++ |
UnzipParameters | ++ |
Zip64EndCentralDirLocator | ++ |
Zip64EndCentralDirRecord | ++ |
Zip64ExtendedInfo | ++ |
ZipModel | ++ |
ZipParameters | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.model | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.core | +|
---|---|
FileHeader
+
+ + |
+|
LocalFileHeader
+
+ + |
+|
UnzipParameters
+
+ + |
+|
ZipModel
+
+ + |
+|
ZipParameters
+
+ + |
+
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.crypto | +|
---|---|
FileHeader
+
+ + |
+|
LocalFileHeader
+
+ + |
+
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.io | +|
---|---|
FileHeader
+
+ + |
+|
LocalFileHeader
+
+ + |
+|
ZipModel
+
+ + |
+|
ZipParameters
+
+ + |
+
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.model | +|
---|---|
AESExtraDataRecord
+
+ + |
+|
ArchiveExtraDataRecord
+
+ + |
+|
CentralDirectory
+
+ + |
+|
DigitalSignature
+
+ + |
+|
EndCentralDirRecord
+
+ + |
+|
FileHeader
+
+ + |
+|
LocalFileHeader
+
+ + |
+|
UnzipParameters
+
+ + |
+|
Zip64EndCentralDirLocator
+
+ + |
+|
Zip64EndCentralDirRecord
+
+ + |
+|
Zip64ExtendedInfo
+
+ + |
+|
ZipModel
+
+ + |
+
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.unzip | +|
---|---|
FileHeader
+
+ + |
+|
LocalFileHeader
+
+ + |
+|
UnzipParameters
+
+ + |
+|
ZipModel
+
+ + |
+
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.util | +|
---|---|
FileHeader
+
+ + |
+|
ZipModel
+
+ + |
+
+Classes in net.lingala.zip4j.model used by net.lingala.zip4j.zip | +|
---|---|
ZipModel
+
+ + |
+|
ZipParameters
+
+ + |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.progress.ProgressMonitor ++
public class ProgressMonitor
+If Zip4j is set to run in thread mode, this class helps retrieve current progress +
+ +
+
+Field Summary | +|
---|---|
+static int |
+OPERATION_ADD
+
++ |
+
+static int |
+OPERATION_CALC_CRC
+
++ |
+
+static int |
+OPERATION_EXTRACT
+
++ |
+
+static int |
+OPERATION_MERGE
+
++ |
+
+static int |
+OPERATION_NONE
+
++ |
+
+static int |
+OPERATION_REMOVE
+
++ |
+
+static int |
+RESULT_CANCELLED
+
++ |
+
+static int |
+RESULT_ERROR
+
++ |
+
+static int |
+RESULT_SUCCESS
+
++ |
+
+static int |
+RESULT_WORKING
+
++ |
+
+static int |
+STATE_BUSY
+
++ |
+
+static int |
+STATE_READY
+
++ |
+
+Constructor Summary | +|
---|---|
ProgressMonitor()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+cancelAllTasks()
+
++ |
+
+ void |
+endProgressMonitorError(Throwable e)
+
++ |
+
+ void |
+endProgressMonitorSuccess()
+
++ |
+
+ void |
+fullReset()
+
++ |
+
+ int |
+getCurrentOperation()
+
++ |
+
+ Throwable |
+getException()
+
++ |
+
+ String |
+getFileName()
+
++ |
+
+ int |
+getPercentDone()
+
++ |
+
+ int |
+getResult()
+
++ |
+
+ int |
+getState()
+
++ |
+
+ long |
+getTotalWork()
+
++ |
+
+ long |
+getWorkCompleted()
+
++ |
+
+ boolean |
+isCancelAllTasks()
+
++ |
+
+ boolean |
+isPause()
+
++ |
+
+ void |
+reset()
+
++ |
+
+ void |
+setCurrentOperation(int currentOperation)
+
++ |
+
+ void |
+setException(Throwable exception)
+
++ |
+
+ void |
+setFileName(String fileName)
+
++ |
+
+ void |
+setPause(boolean pause)
+
++ |
+
+ void |
+setPercentDone(int percentDone)
+
++ |
+
+ void |
+setResult(int result)
+
++ |
+
+ void |
+setState(int state)
+
++ |
+
+ void |
+setTotalWork(long totalWork)
+
++ |
+
+ void |
+updateWorkCompleted(long workCompleted)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final int STATE_READY+
+public static final int STATE_BUSY+
+public static final int RESULT_SUCCESS+
+public static final int RESULT_WORKING+
+public static final int RESULT_ERROR+
+public static final int RESULT_CANCELLED+
+public static final int OPERATION_NONE+
+public static final int OPERATION_ADD+
+public static final int OPERATION_EXTRACT+
+public static final int OPERATION_REMOVE+
+public static final int OPERATION_CALC_CRC+
+public static final int OPERATION_MERGE+
+Constructor Detail | +
---|
+public ProgressMonitor()+
+Method Detail | +
---|
+public int getState()+
+public void setState(int state)+
+public long getTotalWork()+
+public void setTotalWork(long totalWork)+
+public long getWorkCompleted()+
+public void updateWorkCompleted(long workCompleted)+
+public int getPercentDone()+
+public void setPercentDone(int percentDone)+
+public int getResult()+
+public void setResult(int result)+
+public String getFileName()+
+public void setFileName(String fileName)+
+public int getCurrentOperation()+
+public void setCurrentOperation(int currentOperation)+
+public Throwable getException()+
+public void setException(Throwable exception)+
+public void endProgressMonitorSuccess() + throws ZipException+
ZipException
+public void endProgressMonitorError(Throwable e) + throws ZipException+
ZipException
+public void reset()+
+public void fullReset()+
+public boolean isCancelAllTasks()+
+public void cancelAllTasks()+
+public boolean isPause()+
+public void setPause(boolean pause)+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use ProgressMonitor | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+Uses of ProgressMonitor in net.lingala.zip4j.core | +
---|
+ +
Methods in net.lingala.zip4j.core that return ProgressMonitor | +|
---|---|
+ ProgressMonitor |
+ZipFile.getProgressMonitor()
+
++ |
+
+Uses of ProgressMonitor in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model with parameters of type ProgressMonitor | +|
---|---|
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters |
+
+ void |
+FileHeader.extractFile(ZipModel zipModel,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Extracts file to the specified directory using any + user defined parameters in UnzipParameters. |
+
+Uses of ProgressMonitor in net.lingala.zip4j.unzip | +
---|
+ +
Methods in net.lingala.zip4j.unzip with parameters of type ProgressMonitor | +|
---|---|
+ void |
+Unzip.extractAll(UnzipParameters unzipParameters,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+Unzip.extractFile(FileHeader fileHeader,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+UnzipEngine.unzipFile(ProgressMonitor progressMonitor,
+ String outPath,
+ String newFileName,
+ UnzipParameters unzipParameters)
+
++ |
+
+Uses of ProgressMonitor in net.lingala.zip4j.util | +
---|
+ +
Methods in net.lingala.zip4j.util with parameters of type ProgressMonitor | +|
---|---|
+static long |
+CRCUtil.computeFileCRC(String inputFile,
+ ProgressMonitor progressMonitor)
+
++ Calculates CRC of a file |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForMergeOp(ZipModel zipModel,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+ArchiveMaintainer.initProgressMonitorForRemoveOp(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ HashMap |
+ArchiveMaintainer.initRemoveZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+ArchiveMaintainer.mergeSplitZipFiles(ZipModel zipModel,
+ File outputZipFile,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Merges split Zip files into a single Zip file |
+
+ HashMap |
+ArchiveMaintainer.removeZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+Uses of ProgressMonitor in net.lingala.zip4j.zip | +
---|
+ +
Methods in net.lingala.zip4j.zip with parameters of type ProgressMonitor | +|
---|---|
+ void |
+ZipEngine.addFiles(ArrayList fileList,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+ZipEngine.addFolderToZip(File file,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +ProgressMonitor |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
ProgressMonitor | +If Zip4j is set to run in thread mode, this class helps retrieve current progress | +
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.progress | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+Classes in net.lingala.zip4j.progress used by net.lingala.zip4j.core | +|
---|---|
ProgressMonitor
+
+ + If Zip4j is set to run in thread mode, this class helps retrieve current progress |
+
+Classes in net.lingala.zip4j.progress used by net.lingala.zip4j.model | +|
---|---|
ProgressMonitor
+
+ + If Zip4j is set to run in thread mode, this class helps retrieve current progress |
+
+Classes in net.lingala.zip4j.progress used by net.lingala.zip4j.unzip | +|
---|---|
ProgressMonitor
+
+ + If Zip4j is set to run in thread mode, this class helps retrieve current progress |
+
+Classes in net.lingala.zip4j.progress used by net.lingala.zip4j.util | +|
---|---|
ProgressMonitor
+
+ + If Zip4j is set to run in thread mode, this class helps retrieve current progress |
+
+Classes in net.lingala.zip4j.progress used by net.lingala.zip4j.zip | +|
---|---|
ProgressMonitor
+
+ + If Zip4j is set to run in thread mode, this class helps retrieve current progress |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.unzip.Unzip ++
public class Unzip
+
+Constructor Summary | +|
---|---|
Unzip(ZipModel zipModel)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+extractAll(UnzipParameters unzipParameters,
+ String outPath,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+extractFile(FileHeader fileHeader,
+ String outPath,
+ UnzipParameters unzipParameters,
+ String newFileName,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ ZipInputStream |
+getInputStream(FileHeader fileHeader)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Unzip(ZipModel zipModel) + throws ZipException+
ZipException
+Method Detail | +
---|
+public void extractAll(UnzipParameters unzipParameters, + String outPath, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
ZipException
+public void extractFile(FileHeader fileHeader, + String outPath, + UnzipParameters unzipParameters, + String newFileName, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
ZipException
+public ZipInputStream getInputStream(FileHeader fileHeader) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.unzip.UnzipEngine ++
public class UnzipEngine
+
+Constructor Summary | +|
---|---|
UnzipEngine(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+checkCRC()
+
++ |
+
+ IDecrypter |
+getDecrypter()
+
++ |
+
+ FileHeader |
+getFileHeader()
+
++ |
+
+ ZipInputStream |
+getInputStream()
+
++ |
+
+ LocalFileHeader |
+getLocalFileHeader()
+
++ |
+
+ ZipModel |
+getZipModel()
+
++ |
+
+ RandomAccessFile |
+startNextSplitFile()
+
++ |
+
+ void |
+unzipFile(ProgressMonitor progressMonitor,
+ String outPath,
+ String newFileName,
+ UnzipParameters unzipParameters)
+
++ |
+
+ void |
+updateCRC(byte[] buff,
+ int offset,
+ int len)
+
++ |
+
+ void |
+updateCRC(int b)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UnzipEngine(ZipModel zipModel, + FileHeader fileHeader) + throws ZipException+
ZipException
+Method Detail | +
---|
+public void unzipFile(ProgressMonitor progressMonitor, + String outPath, + String newFileName, + UnzipParameters unzipParameters) + throws ZipException+
ZipException
+public ZipInputStream getInputStream() + throws ZipException+
ZipException
+public void checkCRC() + throws ZipException+
ZipException
+public RandomAccessFile startNextSplitFile() + throws IOException, + FileNotFoundException+
IOException
+FileNotFoundException
+public void updateCRC(int b)+
+public void updateCRC(byte[] buff, + int offset, + int len)+
+public FileHeader getFileHeader()+
+public IDecrypter getDecrypter()+
+public ZipModel getZipModel()+
+public LocalFileHeader getLocalFileHeader()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.unzip.UnzipUtil ++
public class UnzipUtil
+
+Constructor Summary | +|
---|---|
UnzipUtil()
+
++ |
+
+Method Summary | +|
---|---|
+static void |
+applyFileAttributes(FileHeader fileHeader,
+ File file)
+
++ |
+
+static void |
+applyFileAttributes(FileHeader fileHeader,
+ File file,
+ UnzipParameters unzipParameters)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public UnzipUtil()+
+Method Detail | +
---|
+public static void applyFileAttributes(FileHeader fileHeader, + File file) + throws ZipException+
ZipException
+public static void applyFileAttributes(FileHeader fileHeader, + File file, + UnzipParameters unzipParameters) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use UnzipEngine | +|
---|---|
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
+Uses of UnzipEngine in net.lingala.zip4j.io | +
---|
+ +
Methods in net.lingala.zip4j.io that return UnzipEngine | +|
---|---|
+ UnzipEngine |
+PartInputStream.getUnzipEngine()
+
++ |
+
+ UnzipEngine |
+InflaterInputStream.getUnzipEngine()
+
++ |
+
+ UnzipEngine |
+BaseInputStream.getUnzipEngine()
+
++ |
+
+ +
Constructors in net.lingala.zip4j.io with parameters of type UnzipEngine | +|
---|---|
InflaterInputStream(RandomAccessFile raf,
+ long start,
+ long len,
+ UnzipEngine unzipEngine)
+
++ |
+|
PartInputStream(RandomAccessFile raf,
+ long start,
+ long len,
+ UnzipEngine unzipEngine)
+
++ |
+
+Uses of UnzipEngine in net.lingala.zip4j.model | +
---|
+ +
Methods in net.lingala.zip4j.model that return UnzipEngine | +|
---|---|
+ UnzipEngine |
+UnzipEngineParameters.getUnzipEngine()
+
++ |
+
+ +
Methods in net.lingala.zip4j.model with parameters of type UnzipEngine | +|
---|---|
+ void |
+UnzipEngineParameters.setUnzipEngine(UnzipEngine unzipEngine)
+
++ |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +Unzip + +UnzipEngine + +UnzipUtil |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
Unzip | ++ |
UnzipEngine | ++ |
UnzipUtil | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages that use net.lingala.zip4j.unzip | +|
---|---|
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
+Classes in net.lingala.zip4j.unzip used by net.lingala.zip4j.io | +|
---|---|
UnzipEngine
+
+ + |
+
+Classes in net.lingala.zip4j.unzip used by net.lingala.zip4j.model | +|
---|---|
UnzipEngine
+
+ + |
+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.util.ArchiveMaintainer ++
public class ArchiveMaintainer
+
+Constructor Summary | +|
---|---|
ArchiveMaintainer()
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+initProgressMonitorForMergeOp(ZipModel zipModel,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+initProgressMonitorForRemoveOp(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ HashMap |
+initRemoveZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor)
+
++ |
+
+ void |
+mergeSplitZipFiles(ZipModel zipModel,
+ File outputZipFile,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ Merges split Zip files into a single Zip file |
+
+ HashMap |
+removeZipFile(ZipModel zipModel,
+ FileHeader fileHeader,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+setComment(ZipModel zipModel,
+ String comment)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ArchiveMaintainer()+
+Method Detail | +
---|
+public HashMap removeZipFile(ZipModel zipModel, + FileHeader fileHeader, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
ZipException
+public HashMap initRemoveZipFile(ZipModel zipModel, + FileHeader fileHeader, + ProgressMonitor progressMonitor) + throws ZipException+
ZipException
+public void mergeSplitZipFiles(ZipModel zipModel, + File outputZipFile, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
+
zipModel
-
+ZipException
+public void setComment(ZipModel zipModel, + String comment) + throws ZipException+
ZipException
+public void initProgressMonitorForRemoveOp(ZipModel zipModel, + FileHeader fileHeader, + ProgressMonitor progressMonitor) + throws ZipException+
ZipException
+public void initProgressMonitorForMergeOp(ZipModel zipModel, + ProgressMonitor progressMonitor) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.util.CRCUtil ++
public class CRCUtil
+
+Constructor Summary | +|
---|---|
CRCUtil()
+
++ |
+
+Method Summary | +|
---|---|
+static long |
+computeFileCRC(String inputFile)
+
++ |
+
+static long |
+computeFileCRC(String inputFile,
+ ProgressMonitor progressMonitor)
+
++ Calculates CRC of a file |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public CRCUtil()+
+Method Detail | +
---|
+public static long computeFileCRC(String inputFile) + throws ZipException+
ZipException
+public static long computeFileCRC(String inputFile, + ProgressMonitor progressMonitor) + throws ZipException+
+
inputFile
- - file for which crc has to be calculated
+ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface InternalZipConstants
+
+Field Summary | +|
---|---|
+static int |
+AES_AUTH_LENGTH
+
++ |
+
+static int |
+AES_BLOCK_SIZE
+
++ |
+
+static int |
+AESSIG
+
++ |
+
+static long |
+ARCEXTDATREC
+
++ |
+
+static int |
+BUFF_SIZE
+
++ |
+
+static int |
+CENATT
+
++ |
+
+static int |
+CENATX
+
++ |
+
+static int |
+CENCOM
+
++ |
+
+static int |
+CENCRC
+
++ |
+
+static int |
+CENDSK
+
++ |
+
+static int |
+CENEXT
+
++ |
+
+static int |
+CENFLG
+
++ |
+
+static int |
+CENHDR
+
++ |
+
+static int |
+CENHOW
+
++ |
+
+static int |
+CENLEN
+
++ |
+
+static int |
+CENNAM
+
++ |
+
+static int |
+CENOFF
+
++ |
+
+static long |
+CENSIG
+
++ |
+
+static int |
+CENSIZ
+
++ |
+
+static int |
+CENTIM
+
++ |
+
+static int |
+CENVEM
+
++ |
+
+static int |
+CENVER
+
++ |
+
+static String |
+CHARSET_COMMENTS_DEFAULT
+
++ |
+
+static String |
+CHARSET_CP850
+
++ |
+
+static String |
+CHARSET_DEFAULT
+
++ |
+
+static String |
+CHARSET_UTF8
+
++ |
+
+static long |
+DIGSIG
+
++ |
+
+static int |
+ENDCOM
+
++ |
+
+static int |
+ENDHDR
+
++ |
+
+static int |
+ENDOFF
+
++ |
+
+static long |
+ENDSIG
+
++ |
+
+static int |
+ENDSIZ
+
++ |
+
+static int |
+ENDSUB
+
++ |
+
+static int |
+ENDTOT
+
++ |
+
+static int |
+EXTCRC
+
++ |
+
+static int |
+EXTHDR
+
++ |
+
+static int |
+EXTLEN
+
++ |
+
+static int |
+EXTRAFIELDZIP64LENGTH
+
++ |
+
+static long |
+EXTSIG
+
++ |
+
+static int |
+EXTSIZ
+
++ |
+
+static int |
+FILE_MODE_ARCHIVE
+
++ |
+
+static int |
+FILE_MODE_HIDDEN
+
++ |
+
+static int |
+FILE_MODE_HIDDEN_ARCHIVE
+
++ |
+
+static int |
+FILE_MODE_NONE
+
++ |
+
+static int |
+FILE_MODE_READ_ONLY
+
++ |
+
+static int |
+FILE_MODE_READ_ONLY_ARCHIVE
+
++ |
+
+static int |
+FILE_MODE_READ_ONLY_HIDDEN
+
++ |
+
+static int |
+FILE_MODE_READ_ONLY_HIDDEN_ARCHIVE
+
++ |
+
+static int |
+FILE_MODE_SYSTEM
+
++ |
+
+static String |
+FILE_SEPARATOR
+
++ |
+
+static int |
+FOLDER_MODE_ARCHIVE
+
++ |
+
+static int |
+FOLDER_MODE_HIDDEN
+
++ |
+
+static int |
+FOLDER_MODE_HIDDEN_ARCHIVE
+
++ |
+
+static int |
+FOLDER_MODE_NONE
+
++ |
+
+static int |
+LIST_TYPE_FILE
+
++ |
+
+static int |
+LIST_TYPE_STRING
+
++ |
+
+static int |
+LOCCRC
+
++ |
+
+static int |
+LOCEXT
+
++ |
+
+static int |
+LOCFLG
+
++ |
+
+static int |
+LOCHDR
+
++ |
+
+static int |
+LOCHOW
+
++ |
+
+static int |
+LOCLEN
+
++ |
+
+static int |
+LOCNAM
+
++ |
+
+static long |
+LOCSIG
+
++ |
+
+static int |
+LOCSIZ
+
++ |
+
+static int |
+LOCTIM
+
++ |
+
+static int |
+LOCVER
+
++ |
+
+static int |
+MAX_ALLOWED_ZIP_COMMENT_LENGTH
+
++ |
+
+static int |
+MIN_SPLIT_LENGTH
+
++ |
+
+static int |
+MODE_UNZIP
+
++ |
+
+static int |
+MODE_ZIP
+
++ |
+
+static String |
+OFFSET_CENTRAL_DIR
+
++ |
+
+static String |
+READ_MODE
+
++ |
+
+static long |
+SPLITSIG
+
++ |
+
+static int |
+STD_DEC_HDR_SIZE
+
++ |
+
+static String |
+THREAD_NAME
+
++ |
+
+static int |
+UFT8_NAMES_FLAG
+
++ |
+
+static int |
+UPDATE_LFH_COMP_SIZE
+
++ |
+
+static int |
+UPDATE_LFH_CRC
+
++ |
+
+static int |
+UPDATE_LFH_UNCOMP_SIZE
+
++ |
+
+static String |
+VERSION
+
++ |
+
+static String |
+WRITE_MODE
+
++ |
+
+static long |
+ZIP_64_LIMIT
+
++ |
+
+static String |
+ZIP_FILE_SEPARATOR
+
++ |
+
+static long |
+ZIP64ENDCENDIRLOC
+
++ |
+
+static long |
+ZIP64ENDCENDIRREC
+
++ |
+
+Field Detail | +
---|
+static final long LOCSIG+
+static final long EXTSIG+
+static final long CENSIG+
+static final long ENDSIG+
+static final long DIGSIG+
+static final long ARCEXTDATREC+
+static final long SPLITSIG+
+static final long ZIP64ENDCENDIRLOC+
+static final long ZIP64ENDCENDIRREC+
+static final int EXTRAFIELDZIP64LENGTH+
+static final int AESSIG+
+static final int LOCHDR+
+static final int EXTHDR+
+static final int CENHDR+
+static final int ENDHDR+
+static final int LOCVER+
+static final int LOCFLG+
+static final int LOCHOW+
+static final int LOCTIM+
+static final int LOCCRC+
+static final int LOCSIZ+
+static final int LOCLEN+
+static final int LOCNAM+
+static final int LOCEXT+
+static final int EXTCRC+
+static final int EXTSIZ+
+static final int EXTLEN+
+static final int CENVEM+
+static final int CENVER+
+static final int CENFLG+
+static final int CENHOW+
+static final int CENTIM+
+static final int CENCRC+
+static final int CENSIZ+
+static final int CENLEN+
+static final int CENNAM+
+static final int CENEXT+
+static final int CENCOM+
+static final int CENDSK+
+static final int CENATT+
+static final int CENATX+
+static final int CENOFF+
+static final int ENDSUB+
+static final int ENDTOT+
+static final int ENDSIZ+
+static final int ENDOFF+
+static final int ENDCOM+
+static final int STD_DEC_HDR_SIZE+
+static final int AES_AUTH_LENGTH+
+static final int AES_BLOCK_SIZE+
+static final int MIN_SPLIT_LENGTH+
+static final long ZIP_64_LIMIT+
+static final String OFFSET_CENTRAL_DIR+
+static final String VERSION+
+static final int MODE_ZIP+
+static final int MODE_UNZIP+
+static final String WRITE_MODE+
+static final String READ_MODE+
+static final int BUFF_SIZE+
+static final int FILE_MODE_NONE+
+static final int FILE_MODE_READ_ONLY+
+static final int FILE_MODE_HIDDEN+
+static final int FILE_MODE_ARCHIVE+
+static final int FILE_MODE_READ_ONLY_HIDDEN+
+static final int FILE_MODE_READ_ONLY_ARCHIVE+
+static final int FILE_MODE_HIDDEN_ARCHIVE+
+static final int FILE_MODE_READ_ONLY_HIDDEN_ARCHIVE+
+static final int FILE_MODE_SYSTEM+
+static final int FOLDER_MODE_NONE+
+static final int FOLDER_MODE_HIDDEN+
+static final int FOLDER_MODE_ARCHIVE+
+static final int FOLDER_MODE_HIDDEN_ARCHIVE+
+static final int UPDATE_LFH_CRC+
+static final int UPDATE_LFH_COMP_SIZE+
+static final int UPDATE_LFH_UNCOMP_SIZE+
+static final int LIST_TYPE_FILE+
+static final int LIST_TYPE_STRING+
+static final int UFT8_NAMES_FLAG+
+static final String CHARSET_UTF8+
+static final String CHARSET_CP850+
+static final String CHARSET_COMMENTS_DEFAULT+
+static final String CHARSET_DEFAULT+
+static final String FILE_SEPARATOR+
+static final String ZIP_FILE_SEPARATOR+
+static final String THREAD_NAME+
+static final int MAX_ALLOWED_ZIP_COMMENT_LENGTH+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.util.Raw ++
public class Raw
+
+Constructor Summary | +|
---|---|
Raw()
+
++ |
+
+Method Summary | +|
---|---|
+static byte |
+bitArrayToByte(int[] bitArray)
+
++ |
+
+static byte[] |
+convertCharArrayToByteArray(char[] charArray)
+
++ Converts a char array to byte array |
+
+static void |
+prepareBuffAESIVBytes(byte[] buff,
+ int nonce,
+ int length)
+
++ |
+
+static int |
+readIntLittleEndian(byte[] b,
+ int off)
+
++ |
+
+static int |
+readLeInt(DataInput di,
+ byte[] b)
+
++ |
+
+static long |
+readLongLittleEndian(byte[] array,
+ int pos)
+
++ |
+
+static short |
+readShortBigEndian(byte[] array,
+ int pos)
+
++ |
+
+static int |
+readShortLittleEndian(byte[] b,
+ int off)
+
++ |
+
+static byte[] |
+toByteArray(int in)
+
++ |
+
+static byte[] |
+toByteArray(int in,
+ int outSize)
+
++ |
+
+static void |
+writeIntLittleEndian(byte[] array,
+ int pos,
+ int value)
+
++ |
+
+static void |
+writeLongLittleEndian(byte[] array,
+ int pos,
+ long value)
+
++ |
+
+static void |
+writeShortLittleEndian(byte[] array,
+ int pos,
+ short value)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Raw()+
+Method Detail | +
---|
+public static long readLongLittleEndian(byte[] array, + int pos)+
+public static int readLeInt(DataInput di, + byte[] b) + throws ZipException+
ZipException
+public static int readShortLittleEndian(byte[] b, + int off)+
+public static final short readShortBigEndian(byte[] array, + int pos)+
+public static int readIntLittleEndian(byte[] b, + int off)+
+public static byte[] toByteArray(int in, + int outSize)+
+public static byte[] toByteArray(int in)+
+public static final void writeShortLittleEndian(byte[] array, + int pos, + short value)+
+public static final void writeIntLittleEndian(byte[] array, + int pos, + int value)+
+public static void writeLongLittleEndian(byte[] array, + int pos, + long value)+
+public static byte bitArrayToByte(int[] bitArray) + throws ZipException+
ZipException
+public static void prepareBuffAESIVBytes(byte[] buff, + int nonce, + int length)+
+public static byte[] convertCharArrayToByteArray(char[] charArray)+
+
charArray
-
+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface Zip4jConstants
+
+Field Summary | +|
---|---|
+static int |
+AES_STRENGTH_128
+
++ |
+
+static int |
+AES_STRENGTH_192
+
++ |
+
+static int |
+AES_STRENGTH_256
+
++ |
+
+static int |
+COMP_AES_ENC
+
++ |
+
+static int |
+COMP_DEFLATE
+
++ |
+
+static int |
+COMP_STORE
+
++ |
+
+static int |
+DEFLATE_LEVEL_FAST
+
++ |
+
+static int |
+DEFLATE_LEVEL_FASTEST
+
++ |
+
+static int |
+DEFLATE_LEVEL_MAXIMUM
+
++ |
+
+static int |
+DEFLATE_LEVEL_NORMAL
+
++ |
+
+static int |
+DEFLATE_LEVEL_ULTRA
+
++ |
+
+static int |
+ENC_METHOD_AES
+
++ |
+
+static int |
+ENC_METHOD_STANDARD
+
++ |
+
+static int |
+ENC_NO_ENCRYPTION
+
++ |
+
+Field Detail | +
---|
+static final int COMP_STORE+
+static final int COMP_DEFLATE+
+static final int COMP_AES_ENC+
+static final int DEFLATE_LEVEL_FASTEST+
+static final int DEFLATE_LEVEL_FAST+
+static final int DEFLATE_LEVEL_NORMAL+
+static final int DEFLATE_LEVEL_MAXIMUM+
+static final int DEFLATE_LEVEL_ULTRA+
+static final int ENC_NO_ENCRYPTION+
+static final int ENC_METHOD_STANDARD+
+static final int ENC_METHOD_AES+
+static final int AES_STRENGTH_128+
+static final int AES_STRENGTH_192+
+static final int AES_STRENGTH_256+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.util.Zip4jUtil ++
public class Zip4jUtil
+
+Constructor Summary | +|
---|---|
Zip4jUtil()
+
++ |
+
+Method Summary | +|
---|---|
+static boolean |
+checkArrayListTypes(ArrayList sourceList,
+ int type)
+
++ Checks to see if all the elements in the arraylist match the given type |
+
+static boolean |
+checkFileExists(File file)
+
++ |
+
+static boolean |
+checkFileExists(String path)
+
++ |
+
+static boolean |
+checkFileReadAccess(String path)
+
++ |
+
+static boolean |
+checkFileWriteAccess(String path)
+
++ |
+
+static boolean |
+checkOutputFolder(String path)
+
++ |
+
+static byte[] |
+convertCharset(String str)
+
++ |
+
+static String |
+decodeFileName(byte[] data,
+ boolean isUTF8)
+
++ Decodes file name based on encoding. |
+
+static String |
+detectCharSet(String str)
+
++ Detects the encoding charset for the input string |
+
+static long |
+dosToJavaTme(int dosTime)
+
++ Converts time in dos format to Java format |
+
+static String |
+getAbsoluteFilePath(String filePath)
+
++ Returns an absoulte path for the given file path |
+
+static long[] |
+getAllHeaderSignatures()
+
++ |
+
+static String |
+getCp850EncodedString(byte[] data)
+
++ Returns a string in Cp850 encoding from the input bytes. |
+
+static int |
+getEncodedStringLength(String str)
+
++ returns the length of the string by wrapping it in a byte buffer with + the appropriate charset of the input string and returns the limit of the + byte buffer |
+
+static int |
+getEncodedStringLength(String str,
+ String charset)
+
++ returns the length of the string in the input encoding |
+
+static FileHeader |
+getFileHeader(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static FileHeader |
+getFileHeaderWithExactMatch(ZipModel zipModel,
+ String fileName)
+
++ |
+
+static long |
+getFileLengh(File file)
+
++ |
+
+static long |
+getFileLengh(String file)
+
++ |
+
+static String |
+getFileNameFromFilePath(File file)
+
++ |
+
+static ArrayList |
+getFilesInDirectoryRec(File path,
+ boolean readHiddenFiles)
+
++ |
+
+static int |
+getIndexOfFileHeader(ZipModel zipModel,
+ FileHeader fileHeader)
+
++ |
+
+static long |
+getLastModifiedFileTime(File file,
+ TimeZone timeZone)
+
++ |
+
+static String |
+getRelativeFileName(String file,
+ String rootFolderInZip,
+ String rootFolderPath)
+
++ |
+
+static ArrayList |
+getSplitZipFiles(ZipModel zipModel)
+
++ |
+
+static String |
+getZipFileNameWithoutExt(String zipFile)
+
++ |
+
+static boolean |
+isStringNotNullAndNotEmpty(String str)
+
++ |
+
+static boolean |
+isSupportedCharset(String charset)
+
++ Checks if the input charset is supported |
+
+static boolean |
+isWindows()
+
++ |
+
+static long |
+javaToDosTime(long time)
+
++ Converts input time from Java to DOS format |
+
+static void |
+setFileArchive(File file)
+
++ |
+
+static void |
+setFileHidden(File file)
+
++ |
+
+static void |
+setFileReadOnly(File file)
+
++ |
+
+static void |
+setFileSystemMode(File file)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public Zip4jUtil()+
+Method Detail | +
---|
+public static boolean isStringNotNullAndNotEmpty(String str)+
+public static boolean checkOutputFolder(String path) + throws ZipException+
ZipException
+public static boolean checkFileReadAccess(String path) + throws ZipException+
ZipException
+public static boolean checkFileWriteAccess(String path) + throws ZipException+
ZipException
+public static boolean checkFileExists(String path) + throws ZipException+
ZipException
+public static boolean checkFileExists(File file) + throws ZipException+
ZipException
+public static boolean isWindows()+
+public static void setFileReadOnly(File file) + throws ZipException+
ZipException
+public static void setFileHidden(File file) + throws ZipException+
ZipException
+public static void setFileArchive(File file) + throws ZipException+
ZipException
+public static void setFileSystemMode(File file) + throws ZipException+
ZipException
+public static long getLastModifiedFileTime(File file, + TimeZone timeZone) + throws ZipException+
ZipException
+public static String getFileNameFromFilePath(File file) + throws ZipException+
ZipException
+public static long getFileLengh(String file) + throws ZipException+
ZipException
+public static long getFileLengh(File file) + throws ZipException+
ZipException
+public static long javaToDosTime(long time)+
+
time
-
++public static long dosToJavaTme(int dosTime)+
+
dosTime
-
++public static FileHeader getFileHeader(ZipModel zipModel, + String fileName) + throws ZipException+
ZipException
+public static FileHeader getFileHeaderWithExactMatch(ZipModel zipModel, + String fileName) + throws ZipException+
ZipException
+public static int getIndexOfFileHeader(ZipModel zipModel, + FileHeader fileHeader) + throws ZipException+
ZipException
+public static ArrayList getFilesInDirectoryRec(File path, + boolean readHiddenFiles) + throws ZipException+
ZipException
+public static String getZipFileNameWithoutExt(String zipFile) + throws ZipException+
ZipException
+public static byte[] convertCharset(String str) + throws ZipException+
ZipException
+public static String decodeFileName(byte[] data, + boolean isUTF8)+
+
data
- isUTF8
-
++public static String getCp850EncodedString(byte[] data)+
+
data
-
++public static String getAbsoluteFilePath(String filePath) + throws ZipException+
+
filePath
-
+ZipException
+public static boolean checkArrayListTypes(ArrayList sourceList, + int type) + throws ZipException+
+
sourceList
- - list to be checkedtype
- - type of elements to be present in the list (ex: File, String, etc)
+ZipException
+public static String detectCharSet(String str) + throws ZipException+
+
str
-
+ZipException
- - if input string is null. In case of any other exception
+ this method returns default System charset+public static int getEncodedStringLength(String str) + throws ZipException+
+
str
-
+ZipException
+public static int getEncodedStringLength(String str, + String charset) + throws ZipException+
+
str
- charset
-
+ZipException
+public static boolean isSupportedCharset(String charset) + throws ZipException+
+
charset
-
+ZipException
+public static ArrayList getSplitZipFiles(ZipModel zipModel) + throws ZipException+
ZipException
+public static String getRelativeFileName(String file, + String rootFolderInZip, + String rootFolderPath) + throws ZipException+
ZipException
+public static long[] getAllHeaderSignatures()+
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Interfaces
+
+ +InternalZipConstants + +Zip4jConstants |
+
+Classes
+
+ +ArchiveMaintainer + +CRCUtil + +Raw + +Zip4jUtil |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Interface Summary | +|
---|---|
InternalZipConstants | ++ |
Zip4jConstants | ++ |
+ +
+Class Summary | +|
---|---|
ArchiveMaintainer | ++ |
CRCUtil | ++ |
Raw | ++ |
Zip4jUtil | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + net.lingala.zip4j.zip.ZipEngine ++
public class ZipEngine
+
+Constructor Summary | +|
---|---|
ZipEngine(ZipModel zipModel)
+
++ |
+
+Method Summary | +|
---|---|
+ void |
+addFiles(ArrayList fileList,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+addFolderToZip(File file,
+ ZipParameters parameters,
+ ProgressMonitor progressMonitor,
+ boolean runInThread)
+
++ |
+
+ void |
+addStreamToZip(InputStream inputStream,
+ ZipParameters parameters)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public ZipEngine(ZipModel zipModel) + throws ZipException+
ZipException
+Method Detail | +
---|
+public void addFiles(ArrayList fileList, + ZipParameters parameters, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
ZipException
+public void addStreamToZip(InputStream inputStream, + ZipParameters parameters) + throws ZipException+
ZipException
+public void addFolderToZip(File file, + ZipParameters parameters, + ProgressMonitor progressMonitor, + boolean runInThread) + throws ZipException+
ZipException
+
+
|
++ + | +|||||||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Classes
+
+ +ZipEngine |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
ZipEngine | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+ | +
---|
+ + + diff --git a/lib/zip4j/javadoc/overview-summary.html b/lib/zip4j/javadoc/overview-summary.html new file mode 100644 index 00000000..b990c24e --- /dev/null +++ b/lib/zip4j/javadoc/overview-summary.html @@ -0,0 +1,197 @@ + + + +
+ + +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages | +|
---|---|
net.lingala.zip4j.core | ++ |
net.lingala.zip4j.crypto | ++ |
net.lingala.zip4j.crypto.engine | ++ |
net.lingala.zip4j.crypto.PBKDF2 | ++ |
net.lingala.zip4j.exception | ++ |
net.lingala.zip4j.io | ++ |
net.lingala.zip4j.model | ++ |
net.lingala.zip4j.progress | ++ |
net.lingala.zip4j.unzip | ++ |
net.lingala.zip4j.util | ++ |
net.lingala.zip4j.zip | ++ |
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Package net.lingala.zip4j.exception | +
---|
+Class net.lingala.zip4j.exception.ZipException extends Exception implements Serializable | +
---|
+serialVersionUID: 1L + +
+Serialized Fields | +
---|
+int code+
+
+
+
|
++ + | +|||||||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+ * Programs should not count on this method to return the actual number
+ * of bytes that could be read without blocking.
+ *
+ * @return 1 before EOF and 0 after EOF.
+ * @exception IOException if an I/O error occurs.
+ *
+ */
+ public int available() {
+ return inflater.finished() ? 0 : 1;
+ }
+
+ public void close() throws IOException {
+ inflater.end();
+ super.close();
+ }
+
+ public UnzipEngine getUnzipEngine() {
+ return super.getUnzipEngine();
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/io/PartInputStream.java b/lib/zip4j/src/net/lingala/zip4j/io/PartInputStream.java
new file mode 100644
index 00000000..8f7c77f2
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/io/PartInputStream.java
@@ -0,0 +1,172 @@
+/*
+* 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.io;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import net.lingala.zip4j.crypto.AESDecrypter;
+import net.lingala.zip4j.crypto.IDecrypter;
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.unzip.UnzipEngine;
+import net.lingala.zip4j.util.InternalZipConstants;
+import net.lingala.zip4j.util.Zip4jConstants;
+
+public class PartInputStream extends BaseInputStream
+{
+ private RandomAccessFile raf;
+ private long bytesRead, length;
+ private UnzipEngine unzipEngine;
+ private IDecrypter decrypter;
+ private byte[] oneByteBuff = new byte[1];
+ private byte[] aesBlockByte = new byte[16];
+ private int aesBytesReturned = 0;
+ private boolean isAESEncryptedFile = false;
+ private int count = -1;
+
+ public PartInputStream(RandomAccessFile raf, long start, long len, UnzipEngine unzipEngine) {
+ this.raf = raf;
+ this.unzipEngine = unzipEngine;
+ this.decrypter = unzipEngine.getDecrypter();
+ this.bytesRead = 0;
+ this.length = len;
+ this.isAESEncryptedFile = unzipEngine.getFileHeader().isEncrypted() &&
+ unzipEngine.getFileHeader().getEncryptionMethod() == Zip4jConstants.ENC_METHOD_AES;
+ }
+
+ public int available() {
+ long amount = length - bytesRead;
+ if (amount > Integer.MAX_VALUE)
+ return Integer.MAX_VALUE;
+ return (int) amount;
+ }
+
+ public int read() throws IOException {
+ if (bytesRead >= length)
+ return -1;
+
+ if (isAESEncryptedFile) {
+ if (aesBytesReturned == 0 || aesBytesReturned == 16) {
+ if (read(aesBlockByte) == -1) {
+ return -1;
+ }
+ aesBytesReturned = 0;
+ }
+ return aesBlockByte[aesBytesReturned++] & 0xff;
+ } else {
+ return read(oneByteBuff, 0, 1) == -1 ? -1 : oneByteBuff[0] & 0xff;
+ }
+ }
+
+ public int read(byte[] b) throws IOException {
+ return this.read(b, 0, b.length);
+ }
+
+ public int read(byte[] b, int off, int len) throws IOException {
+ if (len > length - bytesRead) {
+ len = (int) (length - bytesRead);
+ if (len == 0) {
+ checkAndReadAESMacBytes();
+ return -1;
+ }
+ }
+
+ if (unzipEngine.getDecrypter() instanceof AESDecrypter) {
+ if (bytesRead + len < length) {
+ if (len % 16 != 0) {
+ len = len - (len%16);
+ }
+ }
+ }
+
+ synchronized (raf) {
+ count = raf.read(b, off, len);
+ if ((count < len) && unzipEngine.getZipModel().isSplitArchive()) {
+ raf.close();
+ raf = unzipEngine.startNextSplitFile();
+ if (count < 0) count = 0;
+ int newlyRead = raf.read(b, count, len-count);
+ if (newlyRead > 0)
+ count += newlyRead;
+ }
+ }
+
+ if (count > 0) {
+ if (decrypter != null) {
+ try {
+ decrypter.decryptData(b, off, count);
+ } catch (ZipException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+ bytesRead += count;
+ }
+
+ if (bytesRead >= length) {
+ checkAndReadAESMacBytes();
+ }
+
+ return count;
+ }
+
+ protected void checkAndReadAESMacBytes() throws IOException {
+ if (isAESEncryptedFile) {
+ if (decrypter != null && decrypter instanceof AESDecrypter) {
+ if (((AESDecrypter)decrypter).getStoredMac() != null) {
+ //Stored mac already set
+ return;
+ }
+ byte[] macBytes = new byte[InternalZipConstants.AES_AUTH_LENGTH];
+ int readLen = -1;
+ readLen = raf.read(macBytes);
+ if (readLen != InternalZipConstants.AES_AUTH_LENGTH) {
+ if (unzipEngine.getZipModel().isSplitArchive()) {
+ raf.close();
+ raf = unzipEngine.startNextSplitFile();
+ int newlyRead = raf.read(macBytes, readLen, InternalZipConstants.AES_AUTH_LENGTH - readLen);
+ readLen += newlyRead;
+ } else {
+ throw new IOException("Error occured while reading stored AES authentication bytes");
+ }
+ }
+
+ ((AESDecrypter)unzipEngine.getDecrypter()).setStoredMac(macBytes);
+ }
+ }
+ }
+
+ public long skip(long amount) throws IOException {
+ if (amount < 0)
+ throw new IllegalArgumentException();
+ if (amount > length - bytesRead)
+ amount = length - bytesRead;
+ bytesRead += amount;
+ return amount;
+ }
+
+ public void close() throws IOException {
+ raf.close();
+ }
+
+ public void seek(long pos) throws IOException {
+ raf.seek(pos);
+ }
+
+ public UnzipEngine getUnzipEngine() {
+ return this.unzipEngine;
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/io/SplitOutputStream.java b/lib/zip4j/src/net/lingala/zip4j/io/SplitOutputStream.java
new file mode 100644
index 00000000..d4b0c475
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/io/SplitOutputStream.java
@@ -0,0 +1,234 @@
+/*
+* 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.io;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.util.InternalZipConstants;
+import net.lingala.zip4j.util.Raw;
+import net.lingala.zip4j.util.Zip4jUtil;
+
+public class SplitOutputStream extends OutputStream {
+
+ private RandomAccessFile raf;
+ private long splitLength;
+ private File zipFile;
+ private File outFile;
+ private int currSplitFileCounter;
+ private long bytesWrittenForThisPart;
+
+ public SplitOutputStream(String name) throws FileNotFoundException, ZipException {
+ this(Zip4jUtil.isStringNotNullAndNotEmpty(name) ?
+ new File(name) : null);
+ }
+
+ public SplitOutputStream(File file) throws FileNotFoundException, ZipException {
+ this(file, -1);
+ }
+
+ public SplitOutputStream(String name, long splitLength) throws FileNotFoundException, ZipException {
+ this(!Zip4jUtil.isStringNotNullAndNotEmpty(name) ?
+ new File(name) : null, splitLength);
+ }
+
+ public SplitOutputStream(File file, long splitLength) throws FileNotFoundException, ZipException {
+ if (splitLength >= 0 && splitLength < InternalZipConstants.MIN_SPLIT_LENGTH) {
+ throw new ZipException("split length less than minimum allowed split length of " + InternalZipConstants.MIN_SPLIT_LENGTH +" Bytes");
+ }
+ this.raf = new RandomAccessFile(file, InternalZipConstants.WRITE_MODE);
+ this.splitLength = splitLength;
+ this.outFile = file;
+ this.zipFile = file;
+ this.currSplitFileCounter = 0;
+ this.bytesWrittenForThisPart = 0;
+ }
+
+ public void write(int b) throws IOException {
+ byte[] buff = new byte[1];
+ buff[0] = (byte) b;
+ write(buff, 0, 1);
+ }
+
+ public void write(byte[] b) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ public void write(byte[] b, int off, int len) throws IOException {
+ if (len <= 0) return;
+
+ if (splitLength != -1) {
+
+ if (splitLength < InternalZipConstants.MIN_SPLIT_LENGTH) {
+ throw new IOException("split length less than minimum allowed split length of " + InternalZipConstants.MIN_SPLIT_LENGTH +" Bytes");
+ }
+
+ if (bytesWrittenForThisPart >= splitLength) {
+ startNextSplitFile();
+ raf.write(b, off, len);
+ bytesWrittenForThisPart = len;
+ } else if (bytesWrittenForThisPart + len > splitLength) {
+ if (isHeaderData(b)) {
+ startNextSplitFile();
+ raf.write(b, off, len);
+ bytesWrittenForThisPart = len;
+ } else {
+ raf.write(b, off, (int)(splitLength - bytesWrittenForThisPart));
+ startNextSplitFile();
+ raf.write(b, off + (int)(splitLength - bytesWrittenForThisPart), (int)(len - (splitLength - bytesWrittenForThisPart)));
+ bytesWrittenForThisPart = len - (splitLength - bytesWrittenForThisPart);
+ }
+ } else {
+ raf.write(b, off, len);
+ bytesWrittenForThisPart += len;
+ }
+
+ } else {
+ raf.write(b, off, len);
+ bytesWrittenForThisPart += len;
+ }
+
+ }
+
+ private void startNextSplitFile() throws IOException {
+ try {
+ String zipFileWithoutExt = Zip4jUtil.getZipFileNameWithoutExt(outFile.getName());
+ File currSplitFile = null;
+ String zipFileName = zipFile.getAbsolutePath();
+ String parentPath = (outFile.getParent() == null)?"":outFile.getParent() + System.getProperty("file.separator");
+
+ if (currSplitFileCounter < 9) {
+ currSplitFile = new File(parentPath + zipFileWithoutExt + ".z0" + (currSplitFileCounter + 1));
+ } else {
+ currSplitFile = new File(parentPath + zipFileWithoutExt + ".z" + (currSplitFileCounter + 1));
+ }
+
+ raf.close();
+
+ if (currSplitFile.exists()) {
+ throw new IOException("split file: " + currSplitFile.getName() + " already exists in the current directory, cannot rename this file");
+ }
+
+ if (!zipFile.renameTo(currSplitFile)) {
+ throw new IOException("cannot rename newly created split file");
+ }
+
+ zipFile = new File(zipFileName);
+ raf = new RandomAccessFile(zipFile, InternalZipConstants.WRITE_MODE);
+ currSplitFileCounter++;
+ } catch (ZipException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+
+ private boolean isHeaderData(byte[] buff) {
+ if (buff == null || buff.length < 4) {
+ return false;
+ }
+
+ int signature = Raw.readIntLittleEndian(buff, 0);
+ long[] allHeaderSignatures = Zip4jUtil.getAllHeaderSignatures();
+ if (allHeaderSignatures != null && allHeaderSignatures.length > 0) {
+ for (int i = 0; i < allHeaderSignatures.length; i++) {
+ //Ignore split signature
+ if (allHeaderSignatures[i] != InternalZipConstants.SPLITSIG &&
+ allHeaderSignatures[i] == signature) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if the buffer size is sufficient for the current split file. If not
+ * a new split file will be started.
+ * @param bufferSize
+ * @return true if a new split file was started else false
+ * @throws ZipException
+ */
+ public boolean checkBuffSizeAndStartNextSplitFile(int bufferSize) throws ZipException {
+ if (bufferSize < 0) {
+ throw new ZipException("negative buffersize for checkBuffSizeAndStartNextSplitFile");
+ }
+
+ if (!isBuffSizeFitForCurrSplitFile(bufferSize)) {
+ try {
+ startNextSplitFile();
+ bytesWrittenForThisPart = 0;
+ return true;
+ } catch (IOException e) {
+ throw new ZipException(e);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks if the given buffer size will be fit in the current split file.
+ * If this output stream is a non-split file, then this method always returns true
+ * @param bufferSize
+ * @return true if the buffer size is fit in the current split file or else false.
+ * @throws ZipException
+ */
+ public boolean isBuffSizeFitForCurrSplitFile(int bufferSize) throws ZipException {
+ if (bufferSize < 0) {
+ throw new ZipException("negative buffersize for isBuffSizeFitForCurrSplitFile");
+ }
+
+ if (splitLength >= InternalZipConstants.MIN_SPLIT_LENGTH) {
+ return (bytesWrittenForThisPart + bufferSize <= splitLength);
+ } else {
+ //Non split zip -- return true
+ return true;
+ }
+ }
+
+ public void seek(long pos) throws IOException {
+ raf.seek(pos);
+ }
+
+ public void close() throws IOException {
+ if (raf != null)
+ raf.close();
+ }
+
+ public void flush() throws IOException {
+ }
+
+ public long getFilePointer() throws IOException {
+ return raf.getFilePointer();
+ }
+
+ public boolean isSplitZipFile() {
+ return splitLength!=-1;
+ }
+
+ public long getSplitLength() {
+ return splitLength;
+ }
+
+ public int getCurrSplitFileCounter() {
+ return currSplitFileCounter;
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/io/ZipInputStream.java b/lib/zip4j/src/net/lingala/zip4j/io/ZipInputStream.java
new file mode 100644
index 00000000..a2b9d612
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/io/ZipInputStream.java
@@ -0,0 +1,89 @@
+/*
+* 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.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import net.lingala.zip4j.exception.ZipException;
+
+public class ZipInputStream extends InputStream {
+
+ private BaseInputStream is;
+
+ public ZipInputStream(BaseInputStream is) {
+ this.is = is;
+ }
+
+ public int read() throws IOException {
+ int readByte = is.read();
+ if (readByte != -1) {
+ is.getUnzipEngine().updateCRC(readByte);
+ }
+ return readByte;
+ }
+
+ public int read(byte[] b) throws IOException {
+ return read(b, 0, b.length);
+ }
+
+ public int read(byte[] b, int off, int len) throws IOException {
+ int readLen = is.read(b, off, len);
+ if (readLen > 0 && is.getUnzipEngine() != null) {
+ is.getUnzipEngine().updateCRC(b, off, readLen);
+ }
+ return readLen;
+ }
+
+ /**
+ * Closes the input stream and releases any resources.
+ * This method also checks for the CRC of the extracted file.
+ * If CRC check has to be skipped use close(boolean skipCRCCheck) method
+ *
+ * @throws IOException
+ */
+ public void close() throws IOException {
+ close(false);
+ }
+
+ /**
+ * Closes the input stream and releases any resources.
+ * If skipCRCCheck flag is set to true, this method skips CRC Check
+ * of the extracted file
+ *
+ * @throws IOException
+ */
+ public void close(boolean skipCRCCheck) throws IOException {
+ try {
+ is.close();
+ if (!skipCRCCheck && is.getUnzipEngine() != null) {
+ is.getUnzipEngine().checkCRC();
+ }
+ } catch (ZipException e) {
+ throw new IOException(e.getMessage());
+ }
+ }
+
+ public int available() throws IOException {
+ return is.available();
+ }
+
+ public long skip(long n) throws IOException {
+ return is.skip(n);
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/io/ZipOutputStream.java b/lib/zip4j/src/net/lingala/zip4j/io/ZipOutputStream.java
new file mode 100644
index 00000000..44eb720f
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/io/ZipOutputStream.java
@@ -0,0 +1,33 @@
+package net.lingala.zip4j.io;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import net.lingala.zip4j.model.ZipModel;
+
+public class ZipOutputStream extends DeflaterOutputStream {
+
+ public ZipOutputStream(OutputStream outputStream) {
+ this(outputStream, null);
+ }
+
+ public ZipOutputStream(OutputStream outputStream, ZipModel zipModel) {
+ super(outputStream, zipModel);
+ }
+
+ public void write(int bval) throws IOException {
+ byte[] b = new byte[1];
+ b[0] = (byte) bval;
+ write(b, 0, 1);
+ }
+
+ public void write(byte[] b) throws IOException {
+ write(b, 0, b.length);
+ }
+
+ public void write(byte[] b, int off, int len) throws IOException {
+ crc.update(b, off, len);
+ updateTotalBytesRead(len);
+ super.write(b, off, len);
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/AESExtraDataRecord.java b/lib/zip4j/src/net/lingala/zip4j/model/AESExtraDataRecord.java
new file mode 100644
index 00000000..c71a47b0
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/AESExtraDataRecord.java
@@ -0,0 +1,97 @@
+/*
+* 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.model;
+
+public class AESExtraDataRecord {
+
+ private long signature;
+ private int dataSize;
+ private int versionNumber;
+ private String vendorID;
+ private int aesStrength;
+ private int compressionMethod;
+
+ public AESExtraDataRecord() {
+ signature = -1;
+ dataSize = -1;
+ versionNumber = -1;
+ vendorID = null;
+ aesStrength = -1;
+ compressionMethod = -1;
+ }
+
+
+ public long getSignature() {
+ return signature;
+ }
+
+
+ public void setSignature(long signature) {
+ this.signature = signature;
+ }
+
+
+ public int getDataSize() {
+ return dataSize;
+ }
+
+
+ public void setDataSize(int dataSize) {
+ this.dataSize = dataSize;
+ }
+
+
+ public int getVersionNumber() {
+ return versionNumber;
+ }
+
+
+ public void setVersionNumber(int versionNumber) {
+ this.versionNumber = versionNumber;
+ }
+
+
+ public String getVendorID() {
+ return vendorID;
+ }
+
+
+ public void setVendorID(String vendorID) {
+ this.vendorID = vendorID;
+ }
+
+
+ public int getAesStrength() {
+ return aesStrength;
+ }
+
+
+ public void setAesStrength(int aesStrength) {
+ this.aesStrength = aesStrength;
+ }
+
+
+ public int getCompressionMethod() {
+ return compressionMethod;
+ }
+
+
+ public void setCompressionMethod(int compressionMethod) {
+ this.compressionMethod = compressionMethod;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/ArchiveExtraDataRecord.java b/lib/zip4j/src/net/lingala/zip4j/model/ArchiveExtraDataRecord.java
new file mode 100644
index 00000000..d824d4e4
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/ArchiveExtraDataRecord.java
@@ -0,0 +1,51 @@
+/*
+* 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.model;
+
+public class ArchiveExtraDataRecord {
+
+ private int signature;
+
+ private int extraFieldLength;
+
+ private String extraFieldData;
+
+ public int getSignature() {
+ return signature;
+ }
+
+ public void setSignature(int signature) {
+ this.signature = signature;
+ }
+
+ public int getExtraFieldLength() {
+ return extraFieldLength;
+ }
+
+ public void setExtraFieldLength(int extraFieldLength) {
+ this.extraFieldLength = extraFieldLength;
+ }
+
+ public String getExtraFieldData() {
+ return extraFieldData;
+ }
+
+ public void setExtraFieldData(String extraFieldData) {
+ this.extraFieldData = extraFieldData;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/CentralDirectory.java b/lib/zip4j/src/net/lingala/zip4j/model/CentralDirectory.java
new file mode 100644
index 00000000..502156f6
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/CentralDirectory.java
@@ -0,0 +1,44 @@
+/*
+* 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.model;
+
+import java.util.ArrayList;
+
+public class CentralDirectory {
+
+ private ArrayList fileHeaders;
+
+ private DigitalSignature digitalSignature;
+
+ public ArrayList getFileHeaders() {
+ return fileHeaders;
+ }
+
+ public void setFileHeaders(ArrayList fileHeaders) {
+ this.fileHeaders = fileHeaders;
+ }
+
+ public DigitalSignature getDigitalSignature() {
+ return digitalSignature;
+ }
+
+ public void setDigitalSignature(DigitalSignature digitalSignature) {
+ this.digitalSignature = digitalSignature;
+ }
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/DataDescriptor.java b/lib/zip4j/src/net/lingala/zip4j/model/DataDescriptor.java
new file mode 100644
index 00000000..0b0625b0
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/DataDescriptor.java
@@ -0,0 +1,51 @@
+/*
+* 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.model;
+
+public class DataDescriptor {
+
+ private String crc32;
+
+ private int compressedSize;
+
+ private int uncompressedSize;
+
+ public String getCrc32() {
+ return crc32;
+ }
+
+ public void setCrc32(String crc32) {
+ this.crc32 = crc32;
+ }
+
+ public int getCompressedSize() {
+ return compressedSize;
+ }
+
+ public void setCompressedSize(int compressedSize) {
+ this.compressedSize = compressedSize;
+ }
+
+ public int getUncompressedSize() {
+ return uncompressedSize;
+ }
+
+ public void setUncompressedSize(int uncompressedSize) {
+ this.uncompressedSize = uncompressedSize;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/DigitalSignature.java b/lib/zip4j/src/net/lingala/zip4j/model/DigitalSignature.java
new file mode 100644
index 00000000..ffc0954f
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/DigitalSignature.java
@@ -0,0 +1,51 @@
+/*
+* 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.model;
+
+public class DigitalSignature {
+
+ private int headerSignature;
+
+ private int sizeOfData;
+
+ private String signatureData;
+
+ public int getHeaderSignature() {
+ return headerSignature;
+ }
+
+ public void setHeaderSignature(int headerSignature) {
+ this.headerSignature = headerSignature;
+ }
+
+ public int getSizeOfData() {
+ return sizeOfData;
+ }
+
+ public void setSizeOfData(int sizeOfData) {
+ this.sizeOfData = sizeOfData;
+ }
+
+ public String getSignatureData() {
+ return signatureData;
+ }
+
+ public void setSignatureData(String signatureData) {
+ this.signatureData = signatureData;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/EndCentralDirRecord.java b/lib/zip4j/src/net/lingala/zip4j/model/EndCentralDirRecord.java
new file mode 100644
index 00000000..64ec5c57
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/EndCentralDirRecord.java
@@ -0,0 +1,122 @@
+/*
+* 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.model;
+
+public class EndCentralDirRecord {
+
+ private long signature;
+
+ private int noOfThisDisk;
+
+ private int noOfThisDiskStartOfCentralDir;
+
+ private int totNoOfEntriesInCentralDirOnThisDisk;
+
+ private int totNoOfEntriesInCentralDir;
+
+ private int sizeOfCentralDir;
+
+ private long offsetOfStartOfCentralDir;
+
+ private int commentLength;
+
+ private String comment;
+
+ private byte[] commentBytes;
+
+ public long getSignature() {
+ return signature;
+ }
+
+ public void setSignature(long signature) {
+ this.signature = signature;
+ }
+
+ public int getNoOfThisDisk() {
+ return noOfThisDisk;
+ }
+
+ public void setNoOfThisDisk(int noOfThisDisk) {
+ this.noOfThisDisk = noOfThisDisk;
+ }
+
+ public int getNoOfThisDiskStartOfCentralDir() {
+ return noOfThisDiskStartOfCentralDir;
+ }
+
+ public void setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir) {
+ this.noOfThisDiskStartOfCentralDir = noOfThisDiskStartOfCentralDir;
+ }
+
+ public int getTotNoOfEntriesInCentralDirOnThisDisk() {
+ return totNoOfEntriesInCentralDirOnThisDisk;
+ }
+
+ public void setTotNoOfEntriesInCentralDirOnThisDisk(
+ int totNoOfEntriesInCentralDirOnThisDisk) {
+ this.totNoOfEntriesInCentralDirOnThisDisk = totNoOfEntriesInCentralDirOnThisDisk;
+ }
+
+ public int getTotNoOfEntriesInCentralDir() {
+ return totNoOfEntriesInCentralDir;
+ }
+
+ public void setTotNoOfEntriesInCentralDir(int totNoOfEntrisInCentralDir) {
+ this.totNoOfEntriesInCentralDir = totNoOfEntrisInCentralDir;
+ }
+
+ public int getSizeOfCentralDir() {
+ return sizeOfCentralDir;
+ }
+
+ public void setSizeOfCentralDir(int sizeOfCentralDir) {
+ this.sizeOfCentralDir = sizeOfCentralDir;
+ }
+
+ public long getOffsetOfStartOfCentralDir() {
+ return offsetOfStartOfCentralDir;
+ }
+
+ public void setOffsetOfStartOfCentralDir(long offSetOfStartOfCentralDir) {
+ this.offsetOfStartOfCentralDir = offSetOfStartOfCentralDir;
+ }
+
+ public int getCommentLength() {
+ return commentLength;
+ }
+
+ public void setCommentLength(int commentLength) {
+ this.commentLength = commentLength;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public byte[] getCommentBytes() {
+ return commentBytes;
+ }
+
+ public void setCommentBytes(byte[] commentBytes) {
+ this.commentBytes = commentBytes;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/ExtraDataRecord.java b/lib/zip4j/src/net/lingala/zip4j/model/ExtraDataRecord.java
new file mode 100644
index 00000000..a6baf0c5
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/ExtraDataRecord.java
@@ -0,0 +1,51 @@
+/*
+* 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.model;
+
+public class ExtraDataRecord {
+
+ private long header;
+
+ private int sizeOfData;
+
+ private byte[] data;
+
+ public long getHeader() {
+ return header;
+ }
+
+ public void setHeader(long header) {
+ this.header = header;
+ }
+
+ public int getSizeOfData() {
+ return sizeOfData;
+ }
+
+ public void setSizeOfData(int sizeOfData) {
+ this.sizeOfData = sizeOfData;
+ }
+
+ public byte[] getData() {
+ return data;
+ }
+
+ public void setData(byte[] data) {
+ this.data = data;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/FileHeader.java b/lib/zip4j/src/net/lingala/zip4j/model/FileHeader.java
new file mode 100644
index 00000000..5485bc0a
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/FileHeader.java
@@ -0,0 +1,369 @@
+/*
+* 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.model;
+
+import java.util.ArrayList;
+
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.progress.ProgressMonitor;
+import net.lingala.zip4j.unzip.Unzip;
+import net.lingala.zip4j.util.Zip4jUtil;
+
+public class FileHeader {
+
+ private int signature;
+
+ private int versionMadeBy;
+
+ private int versionNeededToExtract;
+
+ private byte[] generalPurposeFlag;
+
+ private int compressionMethod;
+
+ private int lastModFileTime;
+
+ private long crc32;
+
+ private byte[] crcBuff;
+
+ private long compressedSize;
+
+ private long uncompressedSize;
+
+ private int fileNameLength;
+
+ private int extraFieldLength;
+
+ private int fileCommentLength;
+
+ private int diskNumberStart;
+
+ private byte[] internalFileAttr;
+
+ private byte[] externalFileAttr;
+
+ private long offsetLocalHeader;
+
+ private String fileName;
+
+ private String fileComment;
+
+ private boolean isDirectory;
+
+ private boolean isEncrypted;
+
+ private int encryptionMethod;
+
+ private char[] password;
+
+ private boolean dataDescriptorExists;
+
+ private Zip64ExtendedInfo zip64ExtendedInfo;
+
+ private AESExtraDataRecord aesExtraDataRecord;
+
+ private ArrayList extraDataRecords;
+
+ private boolean fileNameUTF8Encoded;
+
+ public FileHeader() {
+ encryptionMethod = -1;
+ crc32 = 0;
+ uncompressedSize = 0;
+ }
+
+ public int getSignature() {
+ return signature;
+ }
+
+ public void setSignature(int signature) {
+ this.signature = signature;
+ }
+
+ public int getVersionMadeBy() {
+ return versionMadeBy;
+ }
+
+ public void setVersionMadeBy(int versionMadeBy) {
+ this.versionMadeBy = versionMadeBy;
+ }
+
+ public int getVersionNeededToExtract() {
+ return versionNeededToExtract;
+ }
+
+ public void setVersionNeededToExtract(int versionNeededToExtract) {
+ this.versionNeededToExtract = versionNeededToExtract;
+ }
+
+ public byte[] getGeneralPurposeFlag() {
+ return generalPurposeFlag;
+ }
+
+ public void setGeneralPurposeFlag(byte[] generalPurposeFlag) {
+ this.generalPurposeFlag = generalPurposeFlag;
+ }
+
+ public int getCompressionMethod() {
+ return compressionMethod;
+ }
+
+ public void setCompressionMethod(int compressionMethod) {
+ this.compressionMethod = compressionMethod;
+ }
+
+ public int getLastModFileTime() {
+ return lastModFileTime;
+ }
+
+ public void setLastModFileTime(int lastModFileTime) {
+ this.lastModFileTime = lastModFileTime;
+ }
+
+ public long getCrc32() {
+ return crc32 & 0xffffffffL;
+ }
+
+ public void setCrc32(long crc32) {
+ this.crc32 = crc32;
+ }
+
+ public long getCompressedSize() {
+ return compressedSize;
+ }
+
+ public void setCompressedSize(long compressedSize) {
+ this.compressedSize = compressedSize;
+ }
+
+ public long getUncompressedSize() {
+ return uncompressedSize;
+ }
+
+ public void setUncompressedSize(long uncompressedSize) {
+ this.uncompressedSize = uncompressedSize;
+ }
+
+ public int getFileNameLength() {
+ return fileNameLength;
+ }
+
+ public void setFileNameLength(int fileNameLength) {
+ this.fileNameLength = fileNameLength;
+ }
+
+ public int getExtraFieldLength() {
+ return extraFieldLength;
+ }
+
+ public void setExtraFieldLength(int extraFieldLength) {
+ this.extraFieldLength = extraFieldLength;
+ }
+
+ public int getFileCommentLength() {
+ return fileCommentLength;
+ }
+
+ public void setFileCommentLength(int fileCommentLength) {
+ this.fileCommentLength = fileCommentLength;
+ }
+
+ public int getDiskNumberStart() {
+ return diskNumberStart;
+ }
+
+ public void setDiskNumberStart(int diskNumberStart) {
+ this.diskNumberStart = diskNumberStart;
+ }
+
+ public byte[] getInternalFileAttr() {
+ return internalFileAttr;
+ }
+
+ public void setInternalFileAttr(byte[] internalFileAttr) {
+ this.internalFileAttr = internalFileAttr;
+ }
+
+ public byte[] getExternalFileAttr() {
+ return externalFileAttr;
+ }
+
+ public void setExternalFileAttr(byte[] externalFileAttr) {
+ this.externalFileAttr = externalFileAttr;
+ }
+
+ public long getOffsetLocalHeader() {
+ return offsetLocalHeader;
+ }
+
+ public void setOffsetLocalHeader(long offsetLocalHeader) {
+ this.offsetLocalHeader = offsetLocalHeader;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public String getFileComment() {
+ return fileComment;
+ }
+
+ public void setFileComment(String fileComment) {
+ this.fileComment = fileComment;
+ }
+
+ public boolean isDirectory() {
+ return isDirectory;
+ }
+
+ public void setDirectory(boolean isDirectory) {
+ this.isDirectory = isDirectory;
+ }
+
+ /**
+ * Extracts file to the specified directory
+ * @param zipModel
+ * @param outPath
+ * @throws ZipException
+ */
+ public void extractFile(ZipModel zipModel, String outPath,
+ ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+ extractFile(zipModel, outPath, null, progressMonitor, runInThread);
+ }
+
+ /**
+ * Extracts file to the specified directory using any
+ * user defined parameters in UnzipParameters
+ * @param zipModel
+ * @param outPath
+ * @param unzipParameters
+ * @throws ZipException
+ */
+ public void extractFile(ZipModel zipModel, String outPath,
+ UnzipParameters unzipParameters, ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+ extractFile(zipModel, outPath, unzipParameters, null, progressMonitor, runInThread);
+ }
+
+ /**
+ * Extracts file to the specified directory using any
+ * user defined parameters in UnzipParameters. Output file name
+ * will be overwritten with the value in newFileName. If this
+ * parameter is null, then file name will be the same as in
+ * FileHeader.getFileName
+ * @param zipModel
+ * @param outPath
+ * @param unzipParameters
+ * @throws ZipException
+ */
+ public void extractFile(ZipModel zipModel, String outPath,
+ UnzipParameters unzipParameters, String newFileName,
+ ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+ if (zipModel == null) {
+ throw new ZipException("input zipModel is null");
+ }
+
+ if (!Zip4jUtil.checkOutputFolder(outPath)) {
+ throw new ZipException("Invalid output path");
+ }
+
+ if (this == null) {
+ throw new ZipException("invalid file header");
+ }
+ Unzip unzip = new Unzip(zipModel);
+ unzip.extractFile(this, outPath, unzipParameters, newFileName, progressMonitor, runInThread);
+ }
+
+ public boolean isEncrypted() {
+ return isEncrypted;
+ }
+
+ public void setEncrypted(boolean isEncrypted) {
+ this.isEncrypted = isEncrypted;
+ }
+
+ public int getEncryptionMethod() {
+ return encryptionMethod;
+ }
+
+ public void setEncryptionMethod(int encryptionMethod) {
+ this.encryptionMethod = encryptionMethod;
+ }
+
+ public char[] getPassword() {
+ return password;
+ }
+
+ public void setPassword(char[] password) {
+ this.password = password;
+ }
+
+ public byte[] getCrcBuff() {
+ return crcBuff;
+ }
+
+ public void setCrcBuff(byte[] crcBuff) {
+ this.crcBuff = crcBuff;
+ }
+
+ public ArrayList getExtraDataRecords() {
+ return extraDataRecords;
+ }
+
+ public void setExtraDataRecords(ArrayList extraDataRecords) {
+ this.extraDataRecords = extraDataRecords;
+ }
+
+ public boolean isDataDescriptorExists() {
+ return dataDescriptorExists;
+ }
+
+ public void setDataDescriptorExists(boolean dataDescriptorExists) {
+ this.dataDescriptorExists = dataDescriptorExists;
+ }
+
+ public Zip64ExtendedInfo getZip64ExtendedInfo() {
+ return zip64ExtendedInfo;
+ }
+
+ public void setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo) {
+ this.zip64ExtendedInfo = zip64ExtendedInfo;
+ }
+
+ public AESExtraDataRecord getAesExtraDataRecord() {
+ return aesExtraDataRecord;
+ }
+
+ public void setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord) {
+ this.aesExtraDataRecord = aesExtraDataRecord;
+ }
+
+ public boolean isFileNameUTF8Encoded() {
+ return fileNameUTF8Encoded;
+ }
+
+ public void setFileNameUTF8Encoded(boolean fileNameUTF8Encoded) {
+ this.fileNameUTF8Encoded = fileNameUTF8Encoded;
+ }
+
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/LocalFileHeader.java b/lib/zip4j/src/net/lingala/zip4j/model/LocalFileHeader.java
new file mode 100644
index 00000000..5b38815c
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/LocalFileHeader.java
@@ -0,0 +1,261 @@
+/*
+* 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.model;
+
+import java.util.ArrayList;
+
+public class LocalFileHeader {
+
+ private int signature;
+
+ private int versionNeededToExtract;
+
+ private byte[] generalPurposeFlag;
+
+ private int compressionMethod;
+
+ private int lastModFileTime;
+
+ private long crc32;
+
+ private byte[] crcBuff;
+
+ private long compressedSize;
+
+ private long uncompressedSize;
+
+ private int fileNameLength;
+
+ private int extraFieldLength;
+
+ private String fileName;
+
+ private byte[] extraField;
+
+ private long offsetStartOfData;
+
+ private boolean isEncrypted;
+
+ private int encryptionMethod;
+
+ private char[] password;
+
+ private ArrayList extraDataRecords;
+
+ private Zip64ExtendedInfo zip64ExtendedInfo;
+
+ private AESExtraDataRecord aesExtraDataRecord;
+
+ private boolean dataDescriptorExists;
+
+ private boolean writeComprSizeInZip64ExtraRecord;
+
+ private boolean fileNameUTF8Encoded;
+
+ public LocalFileHeader() {
+ encryptionMethod = -1;
+ writeComprSizeInZip64ExtraRecord = false;
+ crc32 = 0;
+ uncompressedSize = 0;
+ }
+
+ public int getSignature() {
+ return signature;
+ }
+
+ public void setSignature(int signature) {
+ this.signature = signature;
+ }
+
+ public int getVersionNeededToExtract() {
+ return versionNeededToExtract;
+ }
+
+ public void setVersionNeededToExtract(int versionNeededToExtract) {
+ this.versionNeededToExtract = versionNeededToExtract;
+ }
+
+ public byte[] getGeneralPurposeFlag() {
+ return generalPurposeFlag;
+ }
+
+ public void setGeneralPurposeFlag(byte[] generalPurposeFlag) {
+ this.generalPurposeFlag = generalPurposeFlag;
+ }
+
+ public int getCompressionMethod() {
+ return compressionMethod;
+ }
+
+ public void setCompressionMethod(int compressionMethod) {
+ this.compressionMethod = compressionMethod;
+ }
+
+ public int getLastModFileTime() {
+ return lastModFileTime;
+ }
+
+ public void setLastModFileTime(int lastModFileTime) {
+ this.lastModFileTime = lastModFileTime;
+ }
+
+ public long getCrc32() {
+ return crc32;
+ }
+
+ public void setCrc32(long crc32) {
+ this.crc32 = crc32;
+ }
+
+ public long getCompressedSize() {
+ return compressedSize;
+ }
+
+ public void setCompressedSize(long compressedSize) {
+ this.compressedSize = compressedSize;
+ }
+
+ public long getUncompressedSize() {
+ return uncompressedSize;
+ }
+
+ public void setUncompressedSize(long uncompressedSize) {
+ this.uncompressedSize = uncompressedSize;
+ }
+
+ public int getFileNameLength() {
+ return fileNameLength;
+ }
+
+ public void setFileNameLength(int fileNameLength) {
+ this.fileNameLength = fileNameLength;
+ }
+
+ public int getExtraFieldLength() {
+ return extraFieldLength;
+ }
+
+ public void setExtraFieldLength(int extraFieldLength) {
+ this.extraFieldLength = extraFieldLength;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public byte[] getExtraField() {
+ return extraField;
+ }
+
+ public void setExtraField(byte[] extraField) {
+ this.extraField = extraField;
+ }
+
+ public long getOffsetStartOfData() {
+ return offsetStartOfData;
+ }
+
+ public void setOffsetStartOfData(long offsetStartOfData) {
+ this.offsetStartOfData = offsetStartOfData;
+ }
+
+ public boolean isEncrypted() {
+ return isEncrypted;
+ }
+
+ public void setEncrypted(boolean isEncrypted) {
+ this.isEncrypted = isEncrypted;
+ }
+
+ public int getEncryptionMethod() {
+ return encryptionMethod;
+ }
+
+ public void setEncryptionMethod(int encryptionMethod) {
+ this.encryptionMethod = encryptionMethod;
+ }
+
+ public byte[] getCrcBuff() {
+ return crcBuff;
+ }
+
+ public void setCrcBuff(byte[] crcBuff) {
+ this.crcBuff = crcBuff;
+ }
+
+ public char[] getPassword() {
+ return password;
+ }
+
+ public void setPassword(char[] password) {
+ this.password = password;
+ }
+
+ public ArrayList getExtraDataRecords() {
+ return extraDataRecords;
+ }
+
+ public void setExtraDataRecords(ArrayList extraDataRecords) {
+ this.extraDataRecords = extraDataRecords;
+ }
+
+ public boolean isDataDescriptorExists() {
+ return dataDescriptorExists;
+ }
+
+ public void setDataDescriptorExists(boolean dataDescriptorExists) {
+ this.dataDescriptorExists = dataDescriptorExists;
+ }
+
+ public Zip64ExtendedInfo getZip64ExtendedInfo() {
+ return zip64ExtendedInfo;
+ }
+
+ public void setZip64ExtendedInfo(Zip64ExtendedInfo zip64ExtendedInfo) {
+ this.zip64ExtendedInfo = zip64ExtendedInfo;
+ }
+
+ public AESExtraDataRecord getAesExtraDataRecord() {
+ return aesExtraDataRecord;
+ }
+
+ public void setAesExtraDataRecord(AESExtraDataRecord aesExtraDataRecord) {
+ this.aesExtraDataRecord = aesExtraDataRecord;
+ }
+
+ public boolean isWriteComprSizeInZip64ExtraRecord() {
+ return writeComprSizeInZip64ExtraRecord;
+ }
+
+ public void setWriteComprSizeInZip64ExtraRecord(
+ boolean writeComprSizeInZip64ExtraRecord) {
+ this.writeComprSizeInZip64ExtraRecord = writeComprSizeInZip64ExtraRecord;
+ }
+
+ public boolean isFileNameUTF8Encoded() {
+ return fileNameUTF8Encoded;
+ }
+
+ public void setFileNameUTF8Encoded(boolean fileNameUTF8Encoded) {
+ this.fileNameUTF8Encoded = fileNameUTF8Encoded;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/UnzipEngineParameters.java b/lib/zip4j/src/net/lingala/zip4j/model/UnzipEngineParameters.java
new file mode 100644
index 00000000..12ff2713
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/UnzipEngineParameters.java
@@ -0,0 +1,88 @@
+/*
+* 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.model;
+
+import java.io.FileOutputStream;
+
+import net.lingala.zip4j.crypto.IDecrypter;
+import net.lingala.zip4j.unzip.UnzipEngine;
+
+public class UnzipEngineParameters {
+
+ private ZipModel zipModel;
+
+ private FileHeader fileHeader;
+
+ private LocalFileHeader localFileHeader;
+
+ private IDecrypter iDecryptor;
+
+ private FileOutputStream outputStream;
+
+ private UnzipEngine unzipEngine;
+
+ public ZipModel getZipModel() {
+ return zipModel;
+ }
+
+ public void setZipModel(ZipModel zipModel) {
+ this.zipModel = zipModel;
+ }
+
+ public FileHeader getFileHeader() {
+ return fileHeader;
+ }
+
+ public void setFileHeader(FileHeader fileHeader) {
+ this.fileHeader = fileHeader;
+ }
+
+ public LocalFileHeader getLocalFileHeader() {
+ return localFileHeader;
+ }
+
+ public void setLocalFileHeader(LocalFileHeader localFileHeader) {
+ this.localFileHeader = localFileHeader;
+ }
+
+ public IDecrypter getIDecryptor() {
+ return iDecryptor;
+ }
+
+ public void setIDecryptor(IDecrypter decrypter) {
+ iDecryptor = decrypter;
+ }
+
+ public FileOutputStream getOutputStream() {
+ return outputStream;
+ }
+
+ public void setOutputStream(FileOutputStream outputStream) {
+ this.outputStream = outputStream;
+ }
+
+ public UnzipEngine getUnzipEngine() {
+ return unzipEngine;
+ }
+
+ public void setUnzipEngine(UnzipEngine unzipEngine) {
+ this.unzipEngine = unzipEngine;
+ }
+
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/UnzipParameters.java b/lib/zip4j/src/net/lingala/zip4j/model/UnzipParameters.java
new file mode 100644
index 00000000..050efe3c
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/UnzipParameters.java
@@ -0,0 +1,77 @@
+/*
+* 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.model;
+
+public class UnzipParameters {
+
+ private boolean ignoreReadOnlyFileAttribute;
+ private boolean ignoreHiddenFileAttribute;
+ private boolean ignoreArchiveFileAttribute;
+ private boolean ignoreSystemFileAttribute;
+ private boolean ignoreAllFileAttributes;
+ private boolean ignoreDateTimeAttributes;
+
+ public boolean isIgnoreReadOnlyFileAttribute() {
+ return ignoreReadOnlyFileAttribute;
+ }
+
+ public void setIgnoreReadOnlyFileAttribute(boolean ignoreReadOnlyFileAttribute) {
+ this.ignoreReadOnlyFileAttribute = ignoreReadOnlyFileAttribute;
+ }
+
+ public boolean isIgnoreHiddenFileAttribute() {
+ return ignoreHiddenFileAttribute;
+ }
+
+ public void setIgnoreHiddenFileAttribute(boolean ignoreHiddenFileAttribute) {
+ this.ignoreHiddenFileAttribute = ignoreHiddenFileAttribute;
+ }
+
+ public boolean isIgnoreArchiveFileAttribute() {
+ return ignoreArchiveFileAttribute;
+ }
+
+ public void setIgnoreArchiveFileAttribute(boolean ignoreArchiveFileAttribute) {
+ this.ignoreArchiveFileAttribute = ignoreArchiveFileAttribute;
+ }
+
+ public boolean isIgnoreSystemFileAttribute() {
+ return ignoreSystemFileAttribute;
+ }
+
+ public void setIgnoreSystemFileAttribute(boolean ignoreSystemFileAttribute) {
+ this.ignoreSystemFileAttribute = ignoreSystemFileAttribute;
+ }
+
+ public boolean isIgnoreAllFileAttributes() {
+ return ignoreAllFileAttributes;
+ }
+
+ public void setIgnoreAllFileAttributes(boolean ignoreAllFileAttributes) {
+ this.ignoreAllFileAttributes = ignoreAllFileAttributes;
+ }
+
+ public boolean isIgnoreDateTimeAttributes() {
+ return ignoreDateTimeAttributes;
+ }
+
+ public void setIgnoreDateTimeAttributes(boolean ignoreDateTimeAttributes) {
+ this.ignoreDateTimeAttributes = ignoreDateTimeAttributes;
+ }
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/Zip64EndCentralDirLocator.java b/lib/zip4j/src/net/lingala/zip4j/model/Zip64EndCentralDirLocator.java
new file mode 100644
index 00000000..fcc1e3d8
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/Zip64EndCentralDirLocator.java
@@ -0,0 +1,64 @@
+/*
+* 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.model;
+
+public class Zip64EndCentralDirLocator {
+
+ private long signature;
+
+ private int noOfDiskStartOfZip64EndOfCentralDirRec;
+
+ private long offsetZip64EndOfCentralDirRec;
+
+ private int totNumberOfDiscs;
+
+ public long getSignature() {
+ return signature;
+ }
+
+ public void setSignature(long signature) {
+ this.signature = signature;
+ }
+
+ public int getNoOfDiskStartOfZip64EndOfCentralDirRec() {
+ return noOfDiskStartOfZip64EndOfCentralDirRec;
+ }
+
+ public void setNoOfDiskStartOfZip64EndOfCentralDirRec(
+ int noOfDiskStartOfZip64EndOfCentralDirRec) {
+ this.noOfDiskStartOfZip64EndOfCentralDirRec = noOfDiskStartOfZip64EndOfCentralDirRec;
+ }
+
+ public long getOffsetZip64EndOfCentralDirRec() {
+ return offsetZip64EndOfCentralDirRec;
+ }
+
+ public void setOffsetZip64EndOfCentralDirRec(long offsetZip64EndOfCentralDirRec) {
+ this.offsetZip64EndOfCentralDirRec = offsetZip64EndOfCentralDirRec;
+ }
+
+ public int getTotNumberOfDiscs() {
+ return totNumberOfDiscs;
+ }
+
+ public void setTotNumberOfDiscs(int totNumberOfDiscs) {
+ this.totNumberOfDiscs = totNumberOfDiscs;
+ }
+
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/Zip64EndCentralDirRecord.java b/lib/zip4j/src/net/lingala/zip4j/model/Zip64EndCentralDirRecord.java
new file mode 100644
index 00000000..48da9b4b
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/Zip64EndCentralDirRecord.java
@@ -0,0 +1,135 @@
+/*
+* 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.model;
+
+public class Zip64EndCentralDirRecord {
+
+ private long signature;
+
+ private long sizeOfZip64EndCentralDirRec;
+
+ private int versionMadeBy;
+
+ private int versionNeededToExtract;
+
+ private int noOfThisDisk;
+
+ private int noOfThisDiskStartOfCentralDir;
+
+ private long totNoOfEntriesInCentralDirOnThisDisk;
+
+ private long totNoOfEntriesInCentralDir;
+
+ private long sizeOfCentralDir;
+
+ private long offsetStartCenDirWRTStartDiskNo;
+
+ private byte[] extensibleDataSector;
+
+ public long getSignature() {
+ return signature;
+ }
+
+ public void setSignature(long signature) {
+ this.signature = signature;
+ }
+
+ public long getSizeOfZip64EndCentralDirRec() {
+ return sizeOfZip64EndCentralDirRec;
+ }
+
+ public void setSizeOfZip64EndCentralDirRec(long sizeOfZip64EndCentralDirRec) {
+ this.sizeOfZip64EndCentralDirRec = sizeOfZip64EndCentralDirRec;
+ }
+
+ public int getVersionMadeBy() {
+ return versionMadeBy;
+ }
+
+ public void setVersionMadeBy(int versionMadeBy) {
+ this.versionMadeBy = versionMadeBy;
+ }
+
+ public int getVersionNeededToExtract() {
+ return versionNeededToExtract;
+ }
+
+ public void setVersionNeededToExtract(int versionNeededToExtract) {
+ this.versionNeededToExtract = versionNeededToExtract;
+ }
+
+ public int getNoOfThisDisk() {
+ return noOfThisDisk;
+ }
+
+ public void setNoOfThisDisk(int noOfThisDisk) {
+ this.noOfThisDisk = noOfThisDisk;
+ }
+
+ public int getNoOfThisDiskStartOfCentralDir() {
+ return noOfThisDiskStartOfCentralDir;
+ }
+
+ public void setNoOfThisDiskStartOfCentralDir(int noOfThisDiskStartOfCentralDir) {
+ this.noOfThisDiskStartOfCentralDir = noOfThisDiskStartOfCentralDir;
+ }
+
+ public long getTotNoOfEntriesInCentralDirOnThisDisk() {
+ return totNoOfEntriesInCentralDirOnThisDisk;
+ }
+
+ public void setTotNoOfEntriesInCentralDirOnThisDisk(
+ long totNoOfEntriesInCentralDirOnThisDisk) {
+ this.totNoOfEntriesInCentralDirOnThisDisk = totNoOfEntriesInCentralDirOnThisDisk;
+ }
+
+ public long getTotNoOfEntriesInCentralDir() {
+ return totNoOfEntriesInCentralDir;
+ }
+
+ public void setTotNoOfEntriesInCentralDir(long totNoOfEntriesInCentralDir) {
+ this.totNoOfEntriesInCentralDir = totNoOfEntriesInCentralDir;
+ }
+
+ public long getSizeOfCentralDir() {
+ return sizeOfCentralDir;
+ }
+
+ public void setSizeOfCentralDir(long sizeOfCentralDir) {
+ this.sizeOfCentralDir = sizeOfCentralDir;
+ }
+
+ public long getOffsetStartCenDirWRTStartDiskNo() {
+ return offsetStartCenDirWRTStartDiskNo;
+ }
+
+ public void setOffsetStartCenDirWRTStartDiskNo(
+ long offsetStartCenDirWRTStartDiskNo) {
+ this.offsetStartCenDirWRTStartDiskNo = offsetStartCenDirWRTStartDiskNo;
+ }
+
+ public byte[] getExtensibleDataSector() {
+ return extensibleDataSector;
+ }
+
+ public void setExtensibleDataSector(byte[] extensibleDataSector) {
+ this.extensibleDataSector = extensibleDataSector;
+ }
+
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/Zip64ExtendedInfo.java b/lib/zip4j/src/net/lingala/zip4j/model/Zip64ExtendedInfo.java
new file mode 100644
index 00000000..f58d1e9d
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/Zip64ExtendedInfo.java
@@ -0,0 +1,90 @@
+/*
+* 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.model;
+
+public class Zip64ExtendedInfo {
+
+ private int header;
+
+ private int size;
+
+ private long compressedSize;
+
+ private long unCompressedSize;
+
+ private long offsetLocalHeader;
+
+ private int diskNumberStart;
+
+ public Zip64ExtendedInfo() {
+ compressedSize = -1;
+ unCompressedSize = -1;
+ offsetLocalHeader = -1;
+ diskNumberStart = -1;
+ }
+
+ public int getHeader() {
+ return header;
+ }
+
+ public void setHeader(int header) {
+ this.header = header;
+ }
+
+ public int getSize() {
+ return size;
+ }
+
+ public void setSize(int size) {
+ this.size = size;
+ }
+
+ public long getCompressedSize() {
+ return compressedSize;
+ }
+
+ public void setCompressedSize(long compressedSize) {
+ this.compressedSize = compressedSize;
+ }
+
+ public long getUnCompressedSize() {
+ return unCompressedSize;
+ }
+
+ public void setUnCompressedSize(long unCompressedSize) {
+ this.unCompressedSize = unCompressedSize;
+ }
+
+ public long getOffsetLocalHeader() {
+ return offsetLocalHeader;
+ }
+
+ public void setOffsetLocalHeader(long offsetLocalHeader) {
+ this.offsetLocalHeader = offsetLocalHeader;
+ }
+
+ public int getDiskNumberStart() {
+ return diskNumberStart;
+ }
+
+ public void setDiskNumberStart(int diskNumberStart) {
+ this.diskNumberStart = diskNumberStart;
+ }
+
+
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/ZipModel.java b/lib/zip4j/src/net/lingala/zip4j/model/ZipModel.java
new file mode 100644
index 00000000..85a5afa8
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/ZipModel.java
@@ -0,0 +1,184 @@
+/*
+* 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.model;
+
+import java.util.List;
+
+public class ZipModel implements Cloneable {
+
+ private List localFileHeaderList;
+
+ private List dataDescriptorList;
+
+ private ArchiveExtraDataRecord archiveExtraDataRecord;
+
+ private CentralDirectory centralDirectory;
+
+ private EndCentralDirRecord endCentralDirRecord;
+
+ private Zip64EndCentralDirLocator zip64EndCentralDirLocator;
+
+ private Zip64EndCentralDirRecord zip64EndCentralDirRecord;
+
+ private boolean splitArchive;
+
+ private long splitLength;
+
+ private String zipFile;
+
+ private boolean isZip64Format;
+
+ private boolean isNestedZipFile;
+
+ private long start;
+
+ private long end;
+
+ private String fileNameCharset;
+
+ public ZipModel() {
+ splitLength = -1;
+ }
+
+ public List getLocalFileHeaderList() {
+ return localFileHeaderList;
+ }
+
+ public void setLocalFileHeaderList(List localFileHeaderList) {
+ this.localFileHeaderList = localFileHeaderList;
+ }
+
+ public List getDataDescriptorList() {
+ return dataDescriptorList;
+ }
+
+ public void setDataDescriptorList(List dataDescriptorList) {
+ this.dataDescriptorList = dataDescriptorList;
+ }
+
+ public CentralDirectory getCentralDirectory() {
+ return centralDirectory;
+ }
+
+ public void setCentralDirectory(CentralDirectory centralDirectory) {
+ this.centralDirectory = centralDirectory;
+ }
+
+ public EndCentralDirRecord getEndCentralDirRecord() {
+ return endCentralDirRecord;
+ }
+
+ public void setEndCentralDirRecord(EndCentralDirRecord endCentralDirRecord) {
+ this.endCentralDirRecord = endCentralDirRecord;
+ }
+
+ public ArchiveExtraDataRecord getArchiveExtraDataRecord() {
+ return archiveExtraDataRecord;
+ }
+
+ public void setArchiveExtraDataRecord(
+ ArchiveExtraDataRecord archiveExtraDataRecord) {
+ this.archiveExtraDataRecord = archiveExtraDataRecord;
+ }
+
+ public boolean isSplitArchive() {
+ return splitArchive;
+ }
+
+ public void setSplitArchive(boolean splitArchive) {
+ this.splitArchive = splitArchive;
+ }
+
+ public String getZipFile() {
+ return zipFile;
+ }
+
+ public void setZipFile(String zipFile) {
+ this.zipFile = zipFile;
+ }
+
+ public Zip64EndCentralDirLocator getZip64EndCentralDirLocator() {
+ return zip64EndCentralDirLocator;
+ }
+
+ public void setZip64EndCentralDirLocator(
+ Zip64EndCentralDirLocator zip64EndCentralDirLocator) {
+ this.zip64EndCentralDirLocator = zip64EndCentralDirLocator;
+ }
+
+ public Zip64EndCentralDirRecord getZip64EndCentralDirRecord() {
+ return zip64EndCentralDirRecord;
+ }
+
+ public void setZip64EndCentralDirRecord(
+ Zip64EndCentralDirRecord zip64EndCentralDirRecord) {
+ this.zip64EndCentralDirRecord = zip64EndCentralDirRecord;
+ }
+
+ public boolean isZip64Format() {
+ return isZip64Format;
+ }
+
+ public void setZip64Format(boolean isZip64Format) {
+ this.isZip64Format = isZip64Format;
+ }
+
+ public boolean isNestedZipFile() {
+ return isNestedZipFile;
+ }
+
+ public void setNestedZipFile(boolean isNestedZipFile) {
+ this.isNestedZipFile = isNestedZipFile;
+ }
+
+ public long getStart() {
+ return start;
+ }
+
+ public void setStart(long start) {
+ this.start = start;
+ }
+
+ public long getEnd() {
+ return end;
+ }
+
+ public void setEnd(long end) {
+ this.end = end;
+ }
+
+ public long getSplitLength() {
+ return splitLength;
+ }
+
+ public void setSplitLength(long splitLength) {
+ this.splitLength = splitLength;
+ }
+
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+
+ public String getFileNameCharset() {
+ return fileNameCharset;
+ }
+
+ public void setFileNameCharset(String fileNameCharset) {
+ this.fileNameCharset = fileNameCharset;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/model/ZipParameters.java b/lib/zip4j/src/net/lingala/zip4j/model/ZipParameters.java
new file mode 100644
index 00000000..166be750
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/model/ZipParameters.java
@@ -0,0 +1,195 @@
+/*
+* 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.model;
+
+import java.util.TimeZone;
+
+import net.lingala.zip4j.util.InternalZipConstants;
+import net.lingala.zip4j.util.Zip4jConstants;
+import net.lingala.zip4j.util.Zip4jUtil;
+
+public class ZipParameters implements Cloneable {
+
+ private int compressionMethod;
+ private int compressionLevel;
+ private boolean encryptFiles;
+ private int encryptionMethod;
+ private boolean readHiddenFiles;
+ private char[] password;
+ private int aesKeyStrength;
+ private boolean includeRootFolder;
+ private String rootFolderInZip;
+ private TimeZone timeZone;
+ private int sourceFileCRC;
+ private String defaultFolderPath;
+ private String fileNameInZip;
+ private boolean isSourceExternalStream;
+
+ public ZipParameters() {
+ compressionMethod = Zip4jConstants.COMP_DEFLATE;
+ encryptFiles = false;
+ readHiddenFiles = true;
+ encryptionMethod = Zip4jConstants.ENC_NO_ENCRYPTION;
+ aesKeyStrength = -1;
+ includeRootFolder = true;
+ timeZone = TimeZone.getDefault();
+ }
+
+ public int getCompressionMethod() {
+ return compressionMethod;
+ }
+
+ public void setCompressionMethod(int compressionMethod) {
+ this.compressionMethod = compressionMethod;
+ }
+
+ public boolean isEncryptFiles() {
+ return encryptFiles;
+ }
+
+ public void setEncryptFiles(boolean encryptFiles) {
+ this.encryptFiles = encryptFiles;
+ }
+
+ public int getEncryptionMethod() {
+ return encryptionMethod;
+ }
+
+ public void setEncryptionMethod(int encryptionMethod) {
+ this.encryptionMethod = encryptionMethod;
+ }
+
+ public int getCompressionLevel() {
+ return compressionLevel;
+ }
+
+ public void setCompressionLevel(int compressionLevel) {
+ this.compressionLevel = compressionLevel;
+ }
+
+ public boolean isReadHiddenFiles() {
+ return readHiddenFiles;
+ }
+
+ public void setReadHiddenFiles(boolean readHiddenFiles) {
+ this.readHiddenFiles = readHiddenFiles;
+ }
+
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+
+ public char[] getPassword() {
+ return password;
+ }
+
+ /**
+ * Sets the password for the zip file or the file being added
+ * Loads game resources and enters "Main Menu" state.
+ */
public class Splash extends BasicGameState {
/**
* Logo image.
@@ -45,6 +53,7 @@ public class Splash extends BasicGameState {
// game-related variables
private int state;
+ private boolean init = false;
public Splash(int state) {
this.state = state;
@@ -53,34 +62,12 @@ public class Splash extends BasicGameState {
@Override
public void init(GameContainer container, StateBasedGame game)
throws SlickException {
- final int width = container.getWidth();
- final int height = container.getHeight();
-
logo = new Image("logo.png");
- logo = logo.getScaledCopy((height / 1.2f) / logo.getHeight());
+ logo = logo.getScaledCopy((container.getHeight() / 1.2f) / logo.getHeight());
logo.setAlpha(0f);
// load Utils class first (needed in other 'init' methods)
Utils.init(container, game);
-
- // load other resources in a new thread
- final SongMenu menu = (SongMenu) game.getState(Opsu.STATE_SONGMENU);
- new Thread() {
- @Override
- public void run() {
- // parse song directory
- OsuParser.parseAllFiles(Options.getBeatmapDir(), width, height);
-
- // initialize song list
- Opsu.groups.init(OsuGroupList.SORT_TITLE);
- menu.setFocus(Opsu.groups.getRandomNode(), -1, true);
-
- // load sounds
- SoundController.init();
-
- finished = true;
- }
- }.start();
}
@Override
@@ -93,23 +80,63 @@ public class Splash extends BasicGameState {
logo.drawCentered(width / 2, height / 2);
- // progress tracking
- String currentFile = OsuParser.getCurrentFileName();
- if (currentFile != null && Options.isLoadVerbose()) {
+ // display progress
+ if (Options.isLoadVerbose()) {
g.setColor(Color.white);
g.setFont(Utils.FONT_MEDIUM);
int lineHeight = Utils.FONT_MEDIUM.getLineHeight();
- g.drawString(
- String.format("Loading... (%s%%)", OsuParser.getParserProgress()),
- 25, height - 25 - (lineHeight * 2)
- );
- g.drawString(currentFile, 25, height - 25 - lineHeight);
+
+ String unpackedFile = OszUnpacker.getCurrentFileName();
+ String parsedFile = OsuParser.getCurrentFileName();
+ if (unpackedFile != null) {
+ g.drawString(
+ String.format("Unpacking... (%d%%)", OszUnpacker.getUnpackerProgress()),
+ 25, height - 25 - (lineHeight * 2)
+ );
+ g.drawString(unpackedFile, 25, height - 25 - lineHeight);
+ } else if (parsedFile != null) {
+ g.drawString(
+ String.format("Loading... (%d%%)", OsuParser.getParserProgress()),
+ 25, height - 25 - (lineHeight * 2)
+ );
+ g.drawString(parsedFile, 25, height - 25 - lineHeight);
+ }
}
}
@Override
public void update(GameContainer container, StateBasedGame game, int delta)
throws SlickException {
+ if (!init) {
+ init = true;
+
+ // load other resources in a new thread
+ final int width = container.getWidth();
+ final int height = container.getHeight();
+ final SongMenu menu = (SongMenu) game.getState(Opsu.STATE_SONGMENU);
+ new Thread() {
+ @Override
+ public void run() {
+ File beatmapDir = Options.getBeatmapDir();
+
+ // unpack all OSZ archives
+ OszUnpacker.unpackAllFiles(Options.getOSZDir(), beatmapDir);
+
+ // parse song directory
+ OsuParser.parseAllFiles(beatmapDir, width, height);
+
+ // initialize song list
+ Opsu.groups.init(OsuGroupList.SORT_TITLE);
+ menu.setFocus(Opsu.groups.getRandomNode(), -1, true);
+
+ // load sounds
+ SoundController.init();
+
+ finished = true;
+ }
+ }.start();
+ }
+
// fade in logo
float alpha = logo.getAlpha();
if (alpha < 1f)
+ * Note: For security reasons, usage of this method is discouraged. Use
+ * setPassword(char[]) instead. As strings are immutable, they cannot be wiped
+ * out from memory explicitly after usage. Therefore, usage of Strings to store
+ * passwords is discouraged. More info here:
+ * http://docs.oracle.com/javase/1.5.0/docs/guide/security/jce/JCERefGuide.html#PBEEx
+ * @param password
+ */
+ public void setPassword(String password) {
+ if (password == null) return;
+ setPassword(password.toCharArray());
+ }
+
+ public void setPassword(char[] password) {
+ this.password = password;
+ }
+
+ public int getAesKeyStrength() {
+ return aesKeyStrength;
+ }
+
+ public void setAesKeyStrength(int aesKeyStrength) {
+ this.aesKeyStrength = aesKeyStrength;
+ }
+
+ public boolean isIncludeRootFolder() {
+ return includeRootFolder;
+ }
+
+ public void setIncludeRootFolder(boolean includeRootFolder) {
+ this.includeRootFolder = includeRootFolder;
+ }
+
+ public String getRootFolderInZip() {
+ return rootFolderInZip;
+ }
+
+ public void setRootFolderInZip(String rootFolderInZip) {
+ if (Zip4jUtil.isStringNotNullAndNotEmpty(rootFolderInZip)) {
+
+ if (!rootFolderInZip.endsWith("\\") && !rootFolderInZip.endsWith("/")) {
+ rootFolderInZip = rootFolderInZip + InternalZipConstants.FILE_SEPARATOR;
+ }
+
+ rootFolderInZip = rootFolderInZip.replaceAll("\\\\", "/");
+
+// if (rootFolderInZip.endsWith("/")) {
+// rootFolderInZip = rootFolderInZip.substring(0, rootFolderInZip.length() - 1);
+// rootFolderInZip = rootFolderInZip + "\\";
+// }
+ }
+ this.rootFolderInZip = rootFolderInZip;
+ }
+
+ public TimeZone getTimeZone() {
+ return timeZone;
+ }
+
+ public void setTimeZone(TimeZone timeZone) {
+ this.timeZone = timeZone;
+ }
+
+ public int getSourceFileCRC() {
+ return sourceFileCRC;
+ }
+
+ public void setSourceFileCRC(int sourceFileCRC) {
+ this.sourceFileCRC = sourceFileCRC;
+ }
+
+ public String getDefaultFolderPath() {
+ return defaultFolderPath;
+ }
+
+ public void setDefaultFolderPath(String defaultFolderPath) {
+ this.defaultFolderPath = defaultFolderPath;
+ }
+
+ public String getFileNameInZip() {
+ return fileNameInZip;
+ }
+
+ public void setFileNameInZip(String fileNameInZip) {
+ this.fileNameInZip = fileNameInZip;
+ }
+
+ public boolean isSourceExternalStream() {
+ return isSourceExternalStream;
+ }
+
+ public void setSourceExternalStream(boolean isSourceExternalStream) {
+ this.isSourceExternalStream = isSourceExternalStream;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/progress/ProgressMonitor.java b/lib/zip4j/src/net/lingala/zip4j/progress/ProgressMonitor.java
new file mode 100644
index 00000000..1e123f9e
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/progress/ProgressMonitor.java
@@ -0,0 +1,180 @@
+/*
+* 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.progress;
+
+import net.lingala.zip4j.exception.ZipException;
+
+/**
+ * If Zip4j is set to run in thread mode, this class helps retrieve current progress
+ *
+ */
+public class ProgressMonitor {
+
+ private int state;
+ private long totalWork;
+ private long workCompleted;
+ private int percentDone;
+ private int currentOperation;
+ private String fileName;
+ private int result;
+ private Throwable exception;
+ private boolean cancelAllTasks;
+ private boolean pause;
+
+ //Progress monitor States
+ public static final int STATE_READY = 0;
+ public static final int STATE_BUSY = 1;
+
+ //Progress monitor result codes
+ public static final int RESULT_SUCCESS = 0;
+ public static final int RESULT_WORKING = 1;
+ public static final int RESULT_ERROR = 2;
+ public static final int RESULT_CANCELLED = 3;
+
+ //Operation Types
+ public static final int OPERATION_NONE = -1;
+ public static final int OPERATION_ADD = 0;
+ public static final int OPERATION_EXTRACT = 1;
+ public static final int OPERATION_REMOVE = 2;
+ public static final int OPERATION_CALC_CRC = 3;
+ public static final int OPERATION_MERGE = 4;
+
+ public ProgressMonitor() {
+ reset();
+ percentDone = 0;
+ }
+
+ public int getState() {
+ return state;
+ }
+
+ public void setState(int state) {
+ this.state = state;
+ }
+
+ public long getTotalWork() {
+ return totalWork;
+ }
+
+ public void setTotalWork(long totalWork) {
+ this.totalWork = totalWork;
+ }
+
+ public long getWorkCompleted() {
+ return workCompleted;
+ }
+
+ public void updateWorkCompleted(long workCompleted) {
+ this.workCompleted += workCompleted;
+
+ if (totalWork > 0) {
+ percentDone = (int)((this.workCompleted*100/totalWork));
+ if (percentDone > 100) {
+ percentDone = 100;
+ }
+ }
+ while (pause) {
+ try {
+ Thread.sleep(150);
+ } catch (InterruptedException e) {
+ //Do nothing
+ }
+ }
+ }
+
+ public int getPercentDone() {
+ return percentDone;
+ }
+
+ public void setPercentDone(int percentDone) {
+ this.percentDone = percentDone;
+ }
+
+ public int getResult() {
+ return result;
+ }
+
+ public void setResult(int result) {
+ this.result = result;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public int getCurrentOperation() {
+ return currentOperation;
+ }
+
+ public void setCurrentOperation(int currentOperation) {
+ this.currentOperation = currentOperation;
+ }
+
+ public Throwable getException() {
+ return exception;
+ }
+
+ public void setException(Throwable exception) {
+ this.exception = exception;
+ }
+
+ public void endProgressMonitorSuccess() throws ZipException {
+ reset();
+ result = ProgressMonitor.RESULT_SUCCESS;
+ }
+
+ public void endProgressMonitorError(Throwable e) throws ZipException {
+ reset();
+ result = ProgressMonitor.RESULT_ERROR;
+ exception = e;
+ }
+
+ public void reset() {
+ currentOperation = OPERATION_NONE;
+ state = STATE_READY;
+ fileName = null;
+ totalWork = 0;
+ workCompleted = 0;
+ percentDone = 0;
+ }
+
+ public void fullReset() {
+ reset();
+ exception = null;
+ result = RESULT_SUCCESS;
+ }
+
+ public boolean isCancelAllTasks() {
+ return cancelAllTasks;
+ }
+
+ public void cancelAllTasks() {
+ this.cancelAllTasks = true;
+ }
+
+ public boolean isPause() {
+ return pause;
+ }
+
+ public void setPause(boolean pause) {
+ this.pause = pause;
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/unzip/Unzip.java b/lib/zip4j/src/net/lingala/zip4j/unzip/Unzip.java
new file mode 100644
index 00000000..fc9f70b8
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/unzip/Unzip.java
@@ -0,0 +1,231 @@
+/*
+* 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.unzip;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.io.ZipInputStream;
+import net.lingala.zip4j.model.CentralDirectory;
+import net.lingala.zip4j.model.FileHeader;
+import net.lingala.zip4j.model.UnzipParameters;
+import net.lingala.zip4j.model.ZipModel;
+import net.lingala.zip4j.progress.ProgressMonitor;
+import net.lingala.zip4j.util.InternalZipConstants;
+import net.lingala.zip4j.util.Zip4jUtil;
+
+public class Unzip {
+
+ private ZipModel zipModel;
+
+ public Unzip(ZipModel zipModel) throws ZipException {
+
+ if (zipModel == null) {
+ throw new ZipException("ZipModel is null");
+ }
+
+ this.zipModel = zipModel;
+ }
+
+ public void extractAll(final UnzipParameters unzipParameters, final String outPath,
+ final ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+
+ CentralDirectory centralDirectory = zipModel.getCentralDirectory();
+
+ if (centralDirectory == null ||
+ centralDirectory.getFileHeaders() == null) {
+ throw new ZipException("invalid central directory in zipModel");
+ }
+
+ final ArrayList fileHeaders = centralDirectory.getFileHeaders();
+
+ progressMonitor.setCurrentOperation(ProgressMonitor.OPERATION_EXTRACT);
+ progressMonitor.setTotalWork(calculateTotalWork(fileHeaders));
+ progressMonitor.setState(ProgressMonitor.STATE_BUSY);
+
+ if (runInThread) {
+ Thread thread = new Thread(InternalZipConstants.THREAD_NAME) {
+ public void run() {
+ try {
+ initExtractAll(fileHeaders, unzipParameters, progressMonitor, outPath);
+ progressMonitor.endProgressMonitorSuccess();
+ } catch (ZipException e) {
+ }
+ }
+ };
+ thread.start();
+ } else {
+ initExtractAll(fileHeaders, unzipParameters, progressMonitor, outPath);
+ }
+
+ }
+
+ private void initExtractAll(ArrayList fileHeaders, UnzipParameters unzipParameters,
+ ProgressMonitor progressMonitor, String outPath) throws ZipException {
+
+ for (int i = 0; i < fileHeaders.size(); i++) {
+ FileHeader fileHeader = (FileHeader)fileHeaders.get(i);
+ initExtractFile(fileHeader, outPath, unzipParameters, null, progressMonitor);
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return;
+ }
+ }
+ }
+
+ public void extractFile(final FileHeader fileHeader, final String outPath,
+ final UnzipParameters unzipParameters, final String newFileName,
+ final ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+ if (fileHeader == null) {
+ throw new ZipException("fileHeader is null");
+ }
+
+ progressMonitor.setCurrentOperation(ProgressMonitor.OPERATION_EXTRACT);
+ progressMonitor.setTotalWork(fileHeader.getCompressedSize());
+ progressMonitor.setState(ProgressMonitor.STATE_BUSY);
+ progressMonitor.setPercentDone(0);
+ progressMonitor.setFileName(fileHeader.getFileName());
+
+ if (runInThread) {
+ Thread thread = new Thread(InternalZipConstants.THREAD_NAME) {
+ public void run() {
+ try {
+ initExtractFile(fileHeader, outPath, unzipParameters, newFileName, progressMonitor);
+ progressMonitor.endProgressMonitorSuccess();
+ } catch (ZipException e) {
+ }
+ }
+ };
+ thread.start();
+ } else {
+ initExtractFile(fileHeader, outPath, unzipParameters, newFileName, progressMonitor);
+ progressMonitor.endProgressMonitorSuccess();
+ }
+
+ }
+
+ private void initExtractFile(FileHeader fileHeader, String outPath,
+ UnzipParameters unzipParameters, String newFileName, ProgressMonitor progressMonitor) throws ZipException {
+
+ if (fileHeader == null) {
+ throw new ZipException("fileHeader is null");
+ }
+
+ try {
+ progressMonitor.setFileName(fileHeader.getFileName());
+
+ if (!outPath.endsWith(InternalZipConstants.FILE_SEPARATOR)) {
+ outPath += InternalZipConstants.FILE_SEPARATOR;
+ }
+
+ // If file header is a directory, then check if the directory exists
+ // If not then create a directory and return
+ if (fileHeader.isDirectory()) {
+ try {
+ String fileName = fileHeader.getFileName();
+ if (!Zip4jUtil.isStringNotNullAndNotEmpty(fileName)) {
+ return;
+ }
+ String completePath = outPath + fileName;
+ File file = new File(completePath);
+ if (!file.exists()) {
+ file.mkdirs();
+ }
+ } catch (Exception e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw new ZipException(e);
+ }
+ } else {
+ //Create Directories
+ checkOutputDirectoryStructure(fileHeader, outPath, newFileName);
+
+ UnzipEngine unzipEngine = new UnzipEngine(zipModel, fileHeader);
+ try {
+ unzipEngine.unzipFile(progressMonitor, outPath, newFileName, unzipParameters);
+ } catch (Exception e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw new ZipException(e);
+ }
+ }
+ } catch (ZipException e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw e;
+ } catch (Exception e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw new ZipException(e);
+ }
+ }
+
+ public ZipInputStream getInputStream(FileHeader fileHeader) throws ZipException {
+ UnzipEngine unzipEngine = new UnzipEngine(zipModel, fileHeader);
+ return unzipEngine.getInputStream();
+ }
+
+ private void checkOutputDirectoryStructure(FileHeader fileHeader, String outPath, String newFileName) throws ZipException {
+ if (fileHeader == null || !Zip4jUtil.isStringNotNullAndNotEmpty(outPath)) {
+ throw new ZipException("Cannot check output directory structure...one of the parameters was null");
+ }
+
+ String fileName = fileHeader.getFileName();
+
+ if (Zip4jUtil.isStringNotNullAndNotEmpty(newFileName)) {
+ fileName = newFileName;
+ }
+
+ if (!Zip4jUtil.isStringNotNullAndNotEmpty(fileName)) {
+ // Do nothing
+ return;
+ }
+
+ String compOutPath = outPath + fileName;
+ try {
+ File file = new File(compOutPath);
+ String parentDir = file.getParent();
+ File parentDirFile = new File(parentDir);
+ if (!parentDirFile.exists()) {
+ parentDirFile.mkdirs();
+ }
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private long calculateTotalWork(ArrayList fileHeaders) throws ZipException {
+
+ if (fileHeaders == null) {
+ throw new ZipException("fileHeaders is null, cannot calculate total work");
+ }
+
+ long totalWork = 0;
+
+ for (int i = 0; i < fileHeaders.size(); i++) {
+ FileHeader fileHeader = (FileHeader)fileHeaders.get(i);
+ if (fileHeader.getZip64ExtendedInfo() != null &&
+ fileHeader.getZip64ExtendedInfo().getUnCompressedSize() > 0) {
+ totalWork += fileHeader.getZip64ExtendedInfo().getCompressedSize();
+ } else {
+ totalWork += fileHeader.getCompressedSize();
+ }
+
+ }
+
+ return totalWork;
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/unzip/UnzipEngine.java b/lib/zip4j/src/net/lingala/zip4j/unzip/UnzipEngine.java
new file mode 100644
index 00000000..772e141a
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/unzip/UnzipEngine.java
@@ -0,0 +1,521 @@
+/*
+* 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.unzip;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+import java.util.Arrays;
+import java.util.zip.CRC32;
+
+import net.lingala.zip4j.core.HeaderReader;
+import net.lingala.zip4j.crypto.AESDecrypter;
+import net.lingala.zip4j.crypto.IDecrypter;
+import net.lingala.zip4j.crypto.StandardDecrypter;
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.io.InflaterInputStream;
+import net.lingala.zip4j.io.PartInputStream;
+import net.lingala.zip4j.io.ZipInputStream;
+import net.lingala.zip4j.model.AESExtraDataRecord;
+import net.lingala.zip4j.model.FileHeader;
+import net.lingala.zip4j.model.LocalFileHeader;
+import net.lingala.zip4j.model.UnzipParameters;
+import net.lingala.zip4j.model.ZipModel;
+import net.lingala.zip4j.progress.ProgressMonitor;
+import net.lingala.zip4j.util.InternalZipConstants;
+import net.lingala.zip4j.util.Raw;
+import net.lingala.zip4j.util.Zip4jConstants;
+import net.lingala.zip4j.util.Zip4jUtil;
+
+public class UnzipEngine {
+
+ private ZipModel zipModel;
+ private FileHeader fileHeader;
+ private int currSplitFileCounter = 0;
+ private LocalFileHeader localFileHeader;
+ private IDecrypter decrypter;
+ private CRC32 crc;
+
+ public UnzipEngine(ZipModel zipModel, FileHeader fileHeader) throws ZipException {
+ if (zipModel == null || fileHeader == null) {
+ throw new ZipException("Invalid parameters passed to StoreUnzip. One or more of the parameters were null");
+ }
+
+ this.zipModel = zipModel;
+ this.fileHeader = fileHeader;
+ this.crc = new CRC32();
+ }
+
+ public void unzipFile(ProgressMonitor progressMonitor,
+ String outPath, String newFileName, UnzipParameters unzipParameters) throws ZipException {
+ if (zipModel == null || fileHeader == null || !Zip4jUtil.isStringNotNullAndNotEmpty(outPath)) {
+ throw new ZipException("Invalid parameters passed during unzipping file. One or more of the parameters were null");
+ }
+ InputStream is = null;
+ OutputStream os = null;
+ try {
+ byte[] buff = new byte[InternalZipConstants.BUFF_SIZE];
+ int readLength = -1;
+
+ is = getInputStream();
+ os = getOutputStream(outPath, newFileName);
+
+ while ((readLength = is.read(buff)) != -1) {
+ os.write(buff, 0, readLength);
+ progressMonitor.updateWorkCompleted(readLength);
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return;
+ }
+ }
+
+ closeStreams(is, os);
+
+ UnzipUtil.applyFileAttributes(fileHeader, new File(getOutputFileNameWithPath(outPath, newFileName)), unzipParameters);
+
+ } catch (IOException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ } finally {
+ closeStreams(is, os);
+ }
+ }
+
+ public ZipInputStream getInputStream() throws ZipException {
+ if (fileHeader == null) {
+ throw new ZipException("file header is null, cannot get inputstream");
+ }
+
+ RandomAccessFile raf = null;
+ try {
+ raf = createFileHandler(InternalZipConstants.READ_MODE);
+ String errMsg = "local header and file header do not match";
+ //checkSplitFile();
+
+ if (!checkLocalHeader())
+ throw new ZipException(errMsg);
+
+ init(raf);
+
+ long comprSize = localFileHeader.getCompressedSize();
+ long offsetStartOfData = localFileHeader.getOffsetStartOfData();
+
+ if (localFileHeader.isEncrypted()) {
+ if (localFileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_AES) {
+ if (decrypter instanceof AESDecrypter) {
+ comprSize -= (((AESDecrypter)decrypter).getSaltLength() +
+ ((AESDecrypter)decrypter).getPasswordVerifierLength() + 10);
+ offsetStartOfData += (((AESDecrypter)decrypter).getSaltLength() +
+ ((AESDecrypter)decrypter).getPasswordVerifierLength());
+ } else {
+ throw new ZipException("invalid decryptor when trying to calculate " +
+ "compressed size for AES encrypted file: " + fileHeader.getFileName());
+ }
+ } else if (localFileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_STANDARD) {
+ comprSize -= InternalZipConstants.STD_DEC_HDR_SIZE;
+ offsetStartOfData += InternalZipConstants.STD_DEC_HDR_SIZE;
+ }
+ }
+
+ int compressionMethod = fileHeader.getCompressionMethod();
+ if (fileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_AES) {
+ if (fileHeader.getAesExtraDataRecord() != null) {
+ compressionMethod = fileHeader.getAesExtraDataRecord().getCompressionMethod();
+ } else {
+ throw new ZipException("AESExtraDataRecord does not exist for AES encrypted file: " + fileHeader.getFileName());
+ }
+ }
+ raf.seek(offsetStartOfData);
+ switch (compressionMethod) {
+ case Zip4jConstants.COMP_STORE:
+ return new ZipInputStream(new PartInputStream(raf, offsetStartOfData, comprSize, this));
+ case Zip4jConstants.COMP_DEFLATE:
+ return new ZipInputStream(new InflaterInputStream(raf, offsetStartOfData, comprSize, this));
+ default:
+ throw new ZipException("compression type not supported");
+ }
+ } catch (ZipException e) {
+ if (raf != null) {
+ try {
+ raf.close();
+ } catch (IOException e1) {
+ //ignore
+ }
+ }
+ throw e;
+ } catch (Exception e) {
+ if (raf != null) {
+ try {
+ raf.close();
+ } catch (IOException e1) {
+ }
+ }
+ throw new ZipException(e);
+ }
+
+ }
+
+ private void init(RandomAccessFile raf) throws ZipException {
+
+ if (localFileHeader == null) {
+ throw new ZipException("local file header is null, cannot initialize input stream");
+ }
+
+ try {
+ initDecrypter(raf);
+ } catch (ZipException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private void initDecrypter(RandomAccessFile raf) throws ZipException {
+ if (localFileHeader == null) {
+ throw new ZipException("local file header is null, cannot init decrypter");
+ }
+
+ if (localFileHeader.isEncrypted()) {
+ if (localFileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_STANDARD) {
+ decrypter = new StandardDecrypter(fileHeader, getStandardDecrypterHeaderBytes(raf));
+ } else if (localFileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_AES) {
+ decrypter = new AESDecrypter(localFileHeader, getAESSalt(raf), getAESPasswordVerifier(raf));
+ } else {
+ throw new ZipException("unsupported encryption method");
+ }
+ }
+ }
+
+ private byte[] getStandardDecrypterHeaderBytes(RandomAccessFile raf) throws ZipException {
+ try {
+ byte[] headerBytes = new byte[InternalZipConstants.STD_DEC_HDR_SIZE];
+ raf.seek(localFileHeader.getOffsetStartOfData());
+ raf.read(headerBytes, 0, 12);
+ return headerBytes;
+ } catch (IOException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private byte[] getAESSalt(RandomAccessFile raf) throws ZipException {
+ if (localFileHeader.getAesExtraDataRecord() == null)
+ return null;
+
+ try {
+ AESExtraDataRecord aesExtraDataRecord = localFileHeader.getAesExtraDataRecord();
+ byte[] saltBytes = new byte[calculateAESSaltLength(aesExtraDataRecord)];
+ raf.seek(localFileHeader.getOffsetStartOfData());
+ raf.read(saltBytes);
+ return saltBytes;
+ } catch (IOException e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private byte[] getAESPasswordVerifier(RandomAccessFile raf) throws ZipException {
+ try {
+ byte[] pvBytes = new byte[2];
+ raf.read(pvBytes);
+ return pvBytes;
+ } catch (IOException e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private int calculateAESSaltLength(AESExtraDataRecord aesExtraDataRecord) throws ZipException {
+ if (aesExtraDataRecord == null) {
+ throw new ZipException("unable to determine salt length: AESExtraDataRecord is null");
+ }
+ switch (aesExtraDataRecord.getAesStrength()) {
+ case Zip4jConstants.AES_STRENGTH_128:
+ return 8;
+ case Zip4jConstants.AES_STRENGTH_192:
+ return 12;
+ case Zip4jConstants.AES_STRENGTH_256:
+ return 16;
+ default:
+ throw new ZipException("unable to determine salt length: invalid aes key strength");
+ }
+ }
+
+ public void checkCRC() throws ZipException {
+ if (fileHeader != null) {
+ if (fileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_AES) {
+ if (decrypter != null && decrypter instanceof AESDecrypter) {
+ byte[] tmpMacBytes = ((AESDecrypter)decrypter).getCalculatedAuthenticationBytes();
+ byte[] storedMac = ((AESDecrypter)decrypter).getStoredMac();
+ byte[] calculatedMac = new byte[InternalZipConstants.AES_AUTH_LENGTH];
+
+ if (calculatedMac == null || storedMac == null) {
+ throw new ZipException("CRC (MAC) check failed for " + fileHeader.getFileName());
+ }
+
+ System.arraycopy(tmpMacBytes, 0, calculatedMac, 0, InternalZipConstants.AES_AUTH_LENGTH);
+
+ if (!Arrays.equals(calculatedMac, storedMac)) {
+ throw new ZipException("invalid CRC (MAC) for file: " + fileHeader.getFileName());
+ }
+ }
+ } else {
+ long calculatedCRC = crc.getValue() & 0xffffffffL;
+ if (calculatedCRC != fileHeader.getCrc32()) {
+ String errMsg = "invalid CRC for file: " + fileHeader.getFileName();
+ if (localFileHeader.isEncrypted() &&
+ localFileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_STANDARD) {
+ errMsg += " - Wrong Password?";
+ }
+ throw new ZipException(errMsg);
+ }
+ }
+ }
+ }
+
+// private void checkCRC() throws ZipException {
+// if (fileHeader != null) {
+// if (fileHeader.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_AES) {
+// if (decrypter != null && decrypter instanceof AESDecrypter) {
+// byte[] tmpMacBytes = ((AESDecrypter)decrypter).getCalculatedAuthenticationBytes();
+// byte[] actualMacBytes = ((AESDecrypter)decrypter).getStoredMac();
+// if (tmpMacBytes == null || actualMacBytes == null) {
+// throw new ZipException("null mac value for AES encrypted file: " + fileHeader.getFileName());
+// }
+// byte[] calcMacBytes = new byte[10];
+// System.arraycopy(tmpMacBytes, 0, calcMacBytes, 0, 10);
+// if (!Arrays.equals(calcMacBytes, actualMacBytes)) {
+// throw new ZipException("invalid CRC(mac) for file: " + fileHeader.getFileName());
+// }
+// } else {
+// throw new ZipException("invalid decryptor...cannot calculate mac value for file: "
+// + fileHeader.getFileName());
+// }
+// } else if (unzipEngine != null) {
+// long calculatedCRC = unzipEngine.getCRC();
+// long actualCRC = fileHeader.getCrc32();
+// if (calculatedCRC != actualCRC) {
+// throw new ZipException("invalid CRC for file: " + fileHeader.getFileName());
+// }
+// }
+// }
+// }
+
+ private boolean checkLocalHeader() throws ZipException {
+ RandomAccessFile rafForLH = null;
+ try {
+ rafForLH = checkSplitFile();
+
+ if (rafForLH == null) {
+ rafForLH = new RandomAccessFile(new File(this.zipModel.getZipFile()), InternalZipConstants.READ_MODE);
+ }
+
+ HeaderReader headerReader = new HeaderReader(rafForLH);
+ this.localFileHeader = headerReader.readLocalFileHeader(fileHeader);
+
+ if (localFileHeader == null) {
+ throw new ZipException("error reading local file header. Is this a valid zip file?");
+ }
+
+ //TODO Add more comparision later
+ if (localFileHeader.getCompressionMethod() != fileHeader.getCompressionMethod()) {
+ return false;
+ }
+
+ return true;
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ } finally {
+ if (rafForLH != null) {
+ try {
+ rafForLH.close();
+ } catch (IOException e) {
+ // Ignore this
+ } catch (Exception e) {
+ //Ignore this
+ }
+ }
+ }
+ }
+
+ private RandomAccessFile checkSplitFile() throws ZipException {
+ if (zipModel.isSplitArchive()) {
+ int diskNumberStartOfFile = fileHeader.getDiskNumberStart();
+ currSplitFileCounter = diskNumberStartOfFile + 1;
+ String curZipFile = zipModel.getZipFile();
+ String partFile = null;
+ if (diskNumberStartOfFile == zipModel.getEndCentralDirRecord().getNoOfThisDisk()) {
+ partFile = zipModel.getZipFile();
+ } else {
+ if (diskNumberStartOfFile >= 9) {
+ partFile = curZipFile.substring(0, curZipFile.lastIndexOf(".")) + ".z" + (diskNumberStartOfFile+ 1);
+ } else{
+ partFile = curZipFile.substring(0, curZipFile.lastIndexOf(".")) + ".z0" + (diskNumberStartOfFile+ 1);
+ }
+ }
+
+ try {
+ RandomAccessFile raf = new RandomAccessFile(partFile, InternalZipConstants.READ_MODE);
+
+ if (currSplitFileCounter == 1) {
+ byte[] splitSig = new byte[4];
+ raf.read(splitSig);
+ if (Raw.readIntLittleEndian(splitSig, 0) != InternalZipConstants.SPLITSIG) {
+ throw new ZipException("invalid first part split file signature");
+ }
+ }
+ return raf;
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ } catch (IOException e) {
+ throw new ZipException(e);
+ }
+ }
+ return null;
+ }
+
+ private RandomAccessFile createFileHandler(String mode) throws ZipException {
+ if (this.zipModel == null || !Zip4jUtil.isStringNotNullAndNotEmpty(this.zipModel.getZipFile())) {
+ throw new ZipException("input parameter is null in getFilePointer");
+ }
+
+ try {
+ RandomAccessFile raf = null;
+ if (zipModel.isSplitArchive()) {
+ raf = checkSplitFile();
+ } else {
+ raf = new RandomAccessFile(new File(this.zipModel.getZipFile()), mode);
+ }
+ return raf;
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private FileOutputStream getOutputStream(String outPath, String newFileName) throws ZipException {
+ if (!Zip4jUtil.isStringNotNullAndNotEmpty(outPath)) {
+ throw new ZipException("invalid output path");
+ }
+
+ try {
+ File file = new File(getOutputFileNameWithPath(outPath, newFileName));
+
+ if (!file.getParentFile().exists()) {
+ file.getParentFile().mkdirs();
+ }
+
+ if (file.exists()) {
+ file.delete();
+ }
+
+ FileOutputStream fileOutputStream = new FileOutputStream(file);
+ return fileOutputStream;
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private String getOutputFileNameWithPath(String outPath, String newFileName) throws ZipException {
+ String fileName = null;
+ if (Zip4jUtil.isStringNotNullAndNotEmpty(newFileName)) {
+ fileName = newFileName;
+ } else {
+ fileName = fileHeader.getFileName();
+ }
+ return outPath + System.getProperty("file.separator") + fileName;
+ }
+
+ public RandomAccessFile startNextSplitFile() throws IOException, FileNotFoundException {
+ String currZipFile = zipModel.getZipFile();
+ String partFile = null;
+ if (currSplitFileCounter == zipModel.getEndCentralDirRecord().getNoOfThisDisk()) {
+ partFile = zipModel.getZipFile();
+ } else {
+ if (currSplitFileCounter >= 9) {
+ partFile = currZipFile.substring(0, currZipFile.lastIndexOf(".")) + ".z" + (currSplitFileCounter + 1);
+ } else {
+ partFile = currZipFile.substring(0, currZipFile.lastIndexOf(".")) + ".z0" + (currSplitFileCounter + 1);
+ }
+ }
+ currSplitFileCounter++;
+ try {
+ if(!Zip4jUtil.checkFileExists(partFile)) {
+ throw new IOException("zip split file does not exist: " + partFile);
+ }
+ } catch (ZipException e) {
+ throw new IOException(e.getMessage());
+ }
+ return new RandomAccessFile(partFile, InternalZipConstants.READ_MODE);
+ }
+
+ private void closeStreams(InputStream is, OutputStream os) throws ZipException {
+ try {
+ if (is != null) {
+ is.close();
+ is = null;
+ }
+ } catch (IOException e) {
+ if (e != null && Zip4jUtil.isStringNotNullAndNotEmpty(e.getMessage())) {
+ if (e.getMessage().indexOf(" - Wrong Password?") >= 0) {
+ throw new ZipException(e.getMessage());
+ }
+ }
+ } finally {
+ try {
+ if (os != null) {
+ os.close();
+ os = null;
+ }
+ } catch (IOException e) {
+ //do nothing
+ }
+ }
+ }
+
+ public void updateCRC(int b) {
+ crc.update(b);
+ }
+
+ public void updateCRC(byte[] buff, int offset, int len) {
+ if (buff != null) {
+ crc.update(buff, offset, len);
+ }
+ }
+
+ public FileHeader getFileHeader() {
+ return fileHeader;
+ }
+
+ public IDecrypter getDecrypter() {
+ return decrypter;
+ }
+
+ public ZipModel getZipModel() {
+ return zipModel;
+ }
+
+ public LocalFileHeader getLocalFileHeader() {
+ return localFileHeader;
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/unzip/UnzipUtil.java b/lib/zip4j/src/net/lingala/zip4j/unzip/UnzipUtil.java
new file mode 100644
index 00000000..fde8566f
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/unzip/UnzipUtil.java
@@ -0,0 +1,113 @@
+package net.lingala.zip4j.unzip;
+
+import java.io.File;
+
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.model.FileHeader;
+import net.lingala.zip4j.model.UnzipParameters;
+import net.lingala.zip4j.util.InternalZipConstants;
+import net.lingala.zip4j.util.Zip4jUtil;
+
+public class UnzipUtil {
+
+ public static void applyFileAttributes(FileHeader fileHeader, File file) throws ZipException {
+ applyFileAttributes(fileHeader, file, null);
+ }
+
+ public static void applyFileAttributes(FileHeader fileHeader, File file,
+ UnzipParameters unzipParameters) throws ZipException{
+
+ if (fileHeader == null) {
+ throw new ZipException("cannot set file properties: file header is null");
+ }
+
+ if (file == null) {
+ throw new ZipException("cannot set file properties: output file is null");
+ }
+
+ if (!Zip4jUtil.checkFileExists(file)) {
+ throw new ZipException("cannot set file properties: file doesnot exist");
+ }
+
+ if (unzipParameters == null || !unzipParameters.isIgnoreDateTimeAttributes()) {
+ setFileLastModifiedTime(fileHeader, file);
+ }
+
+ if (unzipParameters == null) {
+ setFileAttributes(fileHeader, file, true, true, true, true);
+ } else {
+ if (unzipParameters.isIgnoreAllFileAttributes()) {
+ setFileAttributes(fileHeader, file, false, false, false, false);
+ } else {
+ setFileAttributes(fileHeader, file, !unzipParameters.isIgnoreReadOnlyFileAttribute(),
+ !unzipParameters.isIgnoreHiddenFileAttribute(),
+ !unzipParameters.isIgnoreArchiveFileAttribute(),
+ !unzipParameters.isIgnoreSystemFileAttribute());
+ }
+ }
+ }
+
+ private static void setFileAttributes(FileHeader fileHeader, File file, boolean setReadOnly,
+ boolean setHidden, boolean setArchive, boolean setSystem) throws ZipException {
+ if (fileHeader == null) {
+ throw new ZipException("invalid file header. cannot set file attributes");
+ }
+
+ byte[] externalAttrbs = fileHeader.getExternalFileAttr();
+ if (externalAttrbs == null) {
+ return;
+ }
+
+ int atrrib = externalAttrbs[0];
+ switch (atrrib) {
+ case InternalZipConstants.FILE_MODE_READ_ONLY:
+ if (setReadOnly) Zip4jUtil.setFileReadOnly(file);
+ break;
+ case InternalZipConstants.FILE_MODE_HIDDEN:
+ case InternalZipConstants.FOLDER_MODE_HIDDEN:
+ if (setHidden) Zip4jUtil.setFileHidden(file);
+ break;
+ case InternalZipConstants.FILE_MODE_ARCHIVE:
+ case InternalZipConstants.FOLDER_MODE_ARCHIVE:
+ if (setArchive) Zip4jUtil.setFileArchive(file);
+ break;
+ case InternalZipConstants.FILE_MODE_READ_ONLY_HIDDEN:
+ if (setReadOnly) Zip4jUtil.setFileReadOnly(file);
+ if (setHidden) Zip4jUtil.setFileHidden(file);
+ break;
+ case InternalZipConstants.FILE_MODE_READ_ONLY_ARCHIVE:
+ if (setArchive) Zip4jUtil.setFileArchive(file);
+ if (setReadOnly) Zip4jUtil.setFileReadOnly(file);
+ break;
+ case InternalZipConstants.FILE_MODE_HIDDEN_ARCHIVE:
+ case InternalZipConstants.FOLDER_MODE_HIDDEN_ARCHIVE:
+ if (setArchive) Zip4jUtil.setFileArchive(file);
+ if (setHidden) Zip4jUtil.setFileHidden(file);
+ break;
+ case InternalZipConstants.FILE_MODE_READ_ONLY_HIDDEN_ARCHIVE:
+ if (setArchive) Zip4jUtil.setFileArchive(file);
+ if (setReadOnly) Zip4jUtil.setFileReadOnly(file);
+ if (setHidden) Zip4jUtil.setFileHidden(file);
+ break;
+ case InternalZipConstants.FILE_MODE_SYSTEM:
+ if (setReadOnly) Zip4jUtil.setFileReadOnly(file);
+ if (setHidden) Zip4jUtil.setFileHidden(file);
+ if (setSystem) Zip4jUtil.setFileSystemMode(file);
+ break;
+ default:
+ //do nothing
+ break;
+ }
+ }
+
+ private static void setFileLastModifiedTime(FileHeader fileHeader, File file) throws ZipException {
+ if (fileHeader.getLastModFileTime() <= 0) {
+ return;
+ }
+
+ if (file.exists()) {
+ file.setLastModified(Zip4jUtil.dosToJavaTme(fileHeader.getLastModFileTime()));
+ }
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/util/ArchiveMaintainer.java b/lib/zip4j/src/net/lingala/zip4j/util/ArchiveMaintainer.java
new file mode 100644
index 00000000..4659df5b
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/util/ArchiveMaintainer.java
@@ -0,0 +1,727 @@
+/*
+* 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.util;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.RandomAccessFile;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import net.lingala.zip4j.core.HeaderReader;
+import net.lingala.zip4j.core.HeaderWriter;
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.io.SplitOutputStream;
+import net.lingala.zip4j.model.FileHeader;
+import net.lingala.zip4j.model.LocalFileHeader;
+import net.lingala.zip4j.model.Zip64EndCentralDirLocator;
+import net.lingala.zip4j.model.Zip64EndCentralDirRecord;
+import net.lingala.zip4j.model.ZipModel;
+import net.lingala.zip4j.progress.ProgressMonitor;
+
+public class ArchiveMaintainer {
+
+ public ArchiveMaintainer() {
+ }
+
+ public HashMap removeZipFile(final ZipModel zipModel,
+ final FileHeader fileHeader, final ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+
+ if (runInThread) {
+ Thread thread = new Thread(InternalZipConstants.THREAD_NAME) {
+ public void run() {
+ try {
+ initRemoveZipFile(zipModel, fileHeader, progressMonitor);
+ progressMonitor.endProgressMonitorSuccess();
+ } catch (ZipException e) {
+ }
+ }
+ };
+ thread.start();
+ return null;
+ } else {
+ HashMap retMap = initRemoveZipFile(zipModel, fileHeader, progressMonitor);
+ progressMonitor.endProgressMonitorSuccess();
+ return retMap;
+ }
+
+ }
+
+ public HashMap initRemoveZipFile(ZipModel zipModel,
+ FileHeader fileHeader, ProgressMonitor progressMonitor) throws ZipException {
+
+ if (fileHeader == null || zipModel == null) {
+ throw new ZipException("input parameters is null in maintain zip file, cannot remove file from archive");
+ }
+
+ OutputStream outputStream = null;
+ File zipFile = null;
+ RandomAccessFile inputStream = null;
+ boolean successFlag = false;
+ String tmpZipFileName = null;
+ HashMap retMap = new HashMap();
+
+ try {
+ int indexOfFileHeader = Zip4jUtil.getIndexOfFileHeader(zipModel, fileHeader);
+
+ if (indexOfFileHeader < 0) {
+ throw new ZipException("file header not found in zip model, cannot remove file");
+ }
+
+ if (zipModel.isSplitArchive()) {
+ throw new ZipException("This is a split archive. Zip file format does not allow updating split/spanned files");
+ }
+
+ long currTime = System.currentTimeMillis();
+ tmpZipFileName = zipModel.getZipFile() + currTime%1000;
+ File tmpFile = new File(tmpZipFileName);
+
+ while (tmpFile.exists()) {
+ currTime = System.currentTimeMillis();
+ tmpZipFileName = zipModel.getZipFile() + currTime%1000;
+ tmpFile = new File(tmpZipFileName);
+ }
+
+ try {
+ outputStream = new SplitOutputStream(new File(tmpZipFileName));
+ } catch (FileNotFoundException e1) {
+ throw new ZipException(e1);
+ }
+
+ zipFile = new File(zipModel.getZipFile());
+
+ inputStream = createFileHandler(zipModel, InternalZipConstants.READ_MODE);
+
+ HeaderReader headerReader = new HeaderReader(inputStream);
+ LocalFileHeader localFileHeader = headerReader.readLocalFileHeader(fileHeader);
+ if (localFileHeader == null) {
+ throw new ZipException("invalid local file header, cannot remove file from archive");
+ }
+
+ long offsetLocalFileHeader = fileHeader.getOffsetLocalHeader();
+
+ if (fileHeader.getZip64ExtendedInfo() != null &&
+ fileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
+ offsetLocalFileHeader = fileHeader.getZip64ExtendedInfo().getOffsetLocalHeader();
+ }
+
+ long offsetEndOfCompressedFile = -1;
+
+ long offsetStartCentralDir = zipModel.getEndCentralDirRecord().getOffsetOfStartOfCentralDir();
+ if (zipModel.isZip64Format()) {
+ if (zipModel.getZip64EndCentralDirRecord() != null) {
+ offsetStartCentralDir = zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo();
+ }
+ }
+
+ ArrayList fileHeaderList = zipModel.getCentralDirectory().getFileHeaders();
+
+ if (indexOfFileHeader == fileHeaderList.size() - 1) {
+ offsetEndOfCompressedFile = offsetStartCentralDir - 1;
+ } else {
+ FileHeader nextFileHeader = (FileHeader)fileHeaderList.get(indexOfFileHeader + 1);
+ if (nextFileHeader != null) {
+ offsetEndOfCompressedFile = nextFileHeader.getOffsetLocalHeader() - 1;
+ if (nextFileHeader.getZip64ExtendedInfo() != null &&
+ nextFileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
+ offsetEndOfCompressedFile = nextFileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() - 1;
+ }
+ }
+ }
+
+ if (offsetLocalFileHeader < 0 || offsetEndOfCompressedFile < 0) {
+ throw new ZipException("invalid offset for start and end of local file, cannot remove file");
+ }
+
+ if(indexOfFileHeader == 0) {
+ if (zipModel.getCentralDirectory().getFileHeaders().size() > 1) {
+ // if this is the only file and it is deleted then no need to do this
+ copyFile(inputStream, outputStream, offsetEndOfCompressedFile + 1, offsetStartCentralDir, progressMonitor);
+ }
+ } else if (indexOfFileHeader == fileHeaderList.size() - 1) {
+ copyFile(inputStream, outputStream, 0, offsetLocalFileHeader, progressMonitor);
+ } else {
+ copyFile(inputStream, outputStream, 0, offsetLocalFileHeader, progressMonitor);
+ copyFile(inputStream, outputStream, offsetEndOfCompressedFile + 1, offsetStartCentralDir, progressMonitor);
+ }
+
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return null;
+ }
+
+ zipModel.getEndCentralDirRecord().setOffsetOfStartOfCentralDir(((SplitOutputStream)outputStream).getFilePointer());
+ zipModel.getEndCentralDirRecord().setTotNoOfEntriesInCentralDir(
+ zipModel.getEndCentralDirRecord().getTotNoOfEntriesInCentralDir() - 1);
+ zipModel.getEndCentralDirRecord().setTotNoOfEntriesInCentralDirOnThisDisk(
+ zipModel.getEndCentralDirRecord().getTotNoOfEntriesInCentralDirOnThisDisk() - 1);
+
+ zipModel.getCentralDirectory().getFileHeaders().remove(indexOfFileHeader);
+
+ for (int i = indexOfFileHeader; i < zipModel.getCentralDirectory().getFileHeaders().size(); i++) {
+ long offsetLocalHdr = ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getOffsetLocalHeader();
+ if (((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo() != null &&
+ ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
+ offsetLocalHdr = ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo().getOffsetLocalHeader();
+ }
+
+ ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).setOffsetLocalHeader(
+ offsetLocalHdr - (offsetEndOfCompressedFile - offsetLocalFileHeader) - 1);
+ }
+
+ HeaderWriter headerWriter = new HeaderWriter();
+ headerWriter.finalizeZipFile(zipModel, outputStream);
+
+ successFlag = true;
+
+ retMap.put(InternalZipConstants.OFFSET_CENTRAL_DIR,
+ Long.toString(zipModel.getEndCentralDirRecord().getOffsetOfStartOfCentralDir()));
+
+ } catch (ZipException e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw e;
+ } catch (Exception e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw new ZipException(e);
+ } finally {
+ try {
+ if (inputStream != null)
+ inputStream.close();
+ if (outputStream != null)
+ outputStream.close();
+ } catch (IOException e) {
+ throw new ZipException("cannot close input stream or output stream when trying to delete a file from zip file");
+ }
+
+ if (successFlag) {
+ restoreFileName(zipFile, tmpZipFileName);
+ } else {
+ File newZipFile = new File(tmpZipFileName);
+ newZipFile.delete();
+ }
+ }
+
+ return retMap;
+ }
+
+ private void restoreFileName(File zipFile, String tmpZipFileName) throws ZipException {
+ if (zipFile.delete())
+ {
+ File newZipFile = new File(tmpZipFileName);
+ if (!newZipFile.renameTo(zipFile)) {
+ throw new ZipException("cannot rename modified zip file");
+ }
+ } else {
+ throw new ZipException("cannot delete old zip file");
+ }
+ }
+
+ private void copyFile(RandomAccessFile inputStream,
+ OutputStream outputStream, long start, long end, ProgressMonitor progressMonitor) throws ZipException {
+
+ if (inputStream == null || outputStream == null) {
+ throw new ZipException("input or output stream is null, cannot copy file");
+ }
+
+ if (start < 0) {
+ throw new ZipException("starting offset is negative, cannot copy file");
+ }
+
+ if (end < 0) {
+ throw new ZipException("end offset is negative, cannot copy file");
+ }
+
+ if (start > end) {
+ throw new ZipException("start offset is greater than end offset, cannot copy file");
+ }
+
+ if (start == end) {
+ return;
+ }
+
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return;
+ }
+
+ try {
+ inputStream.seek(start);
+
+ int readLen = -2;
+ byte[] buff;
+ long bytesRead = 0;
+ long bytesToRead = end - start;
+
+ if ((end - start) < InternalZipConstants.BUFF_SIZE) {
+ buff = new byte[(int)(end - start)];
+ } else {
+ buff = new byte[InternalZipConstants.BUFF_SIZE];
+ }
+
+ while ((readLen = inputStream.read(buff)) != -1) {
+ outputStream.write(buff, 0, readLen);
+
+ progressMonitor.updateWorkCompleted(readLen);
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ return;
+ }
+
+ bytesRead += readLen;
+
+ if(bytesRead == bytesToRead) {
+ break;
+ } else if (bytesRead + buff.length > bytesToRead) {
+ buff = new byte[(int)(bytesToRead - bytesRead)];
+ }
+ }
+
+ } catch (IOException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private RandomAccessFile createFileHandler(ZipModel zipModel, String mode) throws ZipException {
+ if (zipModel == null || !Zip4jUtil.isStringNotNullAndNotEmpty(zipModel.getZipFile())) {
+ throw new ZipException("input parameter is null in getFilePointer, cannot create file handler to remove file");
+ }
+
+ try {
+ return new RandomAccessFile(new File(zipModel.getZipFile()), mode);
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ }
+ }
+
+ /**
+ * Merges split Zip files into a single Zip file
+ * @param zipModel
+ * @throws ZipException
+ */
+ public void mergeSplitZipFiles(final ZipModel zipModel, final File outputZipFile,
+ final ProgressMonitor progressMonitor, boolean runInThread) throws ZipException {
+ if (runInThread) {
+ Thread thread = new Thread(InternalZipConstants.THREAD_NAME) {
+ public void run() {
+ try {
+ initMergeSplitZipFile(zipModel, outputZipFile, progressMonitor);
+ } catch (ZipException e) {
+ }
+ }
+ };
+ thread.start();
+ } else {
+ initMergeSplitZipFile(zipModel, outputZipFile, progressMonitor);
+ }
+ }
+
+ private void initMergeSplitZipFile(ZipModel zipModel, File outputZipFile,
+ ProgressMonitor progressMonitor) throws ZipException {
+ if (zipModel == null) {
+ ZipException e = new ZipException("one of the input parameters is null, cannot merge split zip file");
+ progressMonitor.endProgressMonitorError(e);
+ throw e;
+ }
+
+ if (!zipModel.isSplitArchive()) {
+ ZipException e = new ZipException("archive not a split zip file");
+ progressMonitor.endProgressMonitorError(e);
+ throw e;
+ }
+
+ OutputStream outputStream = null;
+ RandomAccessFile inputStream = null;
+ ArrayList fileSizeList = new ArrayList();
+ long totBytesWritten = 0;
+ boolean splitSigRemoved = false;
+ try {
+
+ int totNoOfSplitFiles = zipModel.getEndCentralDirRecord().getNoOfThisDisk();
+
+ if (totNoOfSplitFiles <= 0) {
+ throw new ZipException("corrupt zip model, archive not a split zip file");
+ }
+
+ outputStream = prepareOutputStreamForMerge(outputZipFile);
+ for (int i = 0; i <= totNoOfSplitFiles; i++) {
+ inputStream = createSplitZipFileHandler(zipModel, i);
+
+ int start = 0;
+ Long end = new Long(inputStream.length());
+
+ if (i == 0) {
+ if (zipModel.getCentralDirectory() != null &&
+ zipModel.getCentralDirectory().getFileHeaders() != null &&
+ zipModel.getCentralDirectory().getFileHeaders().size() > 0) {
+ byte[] buff = new byte[4];
+ inputStream.seek(0);
+ inputStream.read(buff);
+ if (Raw.readIntLittleEndian(buff, 0) == InternalZipConstants.SPLITSIG) {
+ start = 4;
+ splitSigRemoved = true;
+ }
+ }
+ }
+
+ if (i == totNoOfSplitFiles) {
+ end = new Long(zipModel.getEndCentralDirRecord().getOffsetOfStartOfCentralDir());
+ }
+
+ copyFile(inputStream, outputStream, start, end.longValue(), progressMonitor);
+ totBytesWritten += (end.longValue() - start);
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return;
+ }
+
+ fileSizeList.add(end);
+
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+
+ ZipModel newZipModel = (ZipModel)zipModel.clone();
+ newZipModel.getEndCentralDirRecord().setOffsetOfStartOfCentralDir(totBytesWritten);
+
+ updateSplitZipModel(newZipModel, fileSizeList, splitSigRemoved);
+
+ HeaderWriter headerWriter = new HeaderWriter();
+ headerWriter.finalizeZipFileWithoutValidations(newZipModel, outputStream);
+
+ progressMonitor.endProgressMonitorSuccess();
+
+ } catch (IOException e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw new ZipException(e);
+ } catch (Exception e) {
+ progressMonitor.endProgressMonitorError(e);
+ throw new ZipException(e);
+ } finally {
+ if (outputStream != null) {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ }
+
+ /**
+ * Creates an input stream for the split part of the zip file
+ * @return Zip4jInputStream
+ * @throws ZipException
+ */
+
+ private RandomAccessFile createSplitZipFileHandler(ZipModel zipModel, int partNumber) throws ZipException {
+ if (zipModel == null) {
+ throw new ZipException("zip model is null, cannot create split file handler");
+ }
+
+ if (partNumber < 0) {
+ throw new ZipException("invlaid part number, cannot create split file handler");
+ }
+
+ try {
+ String curZipFile = zipModel.getZipFile();
+ String partFile = null;
+ if (partNumber == zipModel.getEndCentralDirRecord().getNoOfThisDisk()) {
+ partFile = zipModel.getZipFile();
+ } else {
+ if (partNumber >= 9) {
+ partFile = curZipFile.substring(0, curZipFile.lastIndexOf(".")) + ".z" + (partNumber+ 1);
+ } else{
+ partFile = curZipFile.substring(0, curZipFile.lastIndexOf(".")) + ".z0" + (partNumber+ 1);
+ }
+ }
+ File tmpFile = new File(partFile);
+
+ if (!Zip4jUtil.checkFileExists(tmpFile)) {
+ throw new ZipException("split file does not exist: " + partFile);
+ }
+
+ return new RandomAccessFile(tmpFile, InternalZipConstants.READ_MODE);
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+
+ }
+
+ private OutputStream prepareOutputStreamForMerge(File outFile) throws ZipException {
+ if (outFile == null) {
+ throw new ZipException("outFile is null, cannot create outputstream");
+ }
+
+ try {
+ return new FileOutputStream(outFile);
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private void updateSplitZipModel(ZipModel zipModel, ArrayList fileSizeList, boolean splitSigRemoved) throws ZipException {
+ if (zipModel == null) {
+ throw new ZipException("zip model is null, cannot update split zip model");
+ }
+
+ zipModel.setSplitArchive(false);
+ updateSplitFileHeader(zipModel, fileSizeList, splitSigRemoved);
+ updateSplitEndCentralDirectory(zipModel);
+ if (zipModel.isZip64Format()) {
+ updateSplitZip64EndCentralDirLocator(zipModel, fileSizeList);
+ updateSplitZip64EndCentralDirRec(zipModel, fileSizeList);
+ }
+ }
+
+ private void updateSplitFileHeader(ZipModel zipModel, ArrayList fileSizeList, boolean splitSigRemoved) throws ZipException {
+ try {
+
+ if (zipModel.getCentralDirectory()== null) {
+ throw new ZipException("corrupt zip model - getCentralDirectory, cannot update split zip model");
+ }
+
+ int fileHeaderCount = zipModel.getCentralDirectory().getFileHeaders().size();
+ int splitSigOverhead = 0;
+ if (splitSigRemoved)
+ splitSigOverhead = 4;
+
+ for (int i = 0; i < fileHeaderCount; i++) {
+ long offsetLHToAdd = 0;
+
+ for (int j = 0; j < ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getDiskNumberStart(); j++) {
+ offsetLHToAdd += ((Long)fileSizeList.get(j)).longValue();
+ }
+ ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).setOffsetLocalHeader(
+ ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getOffsetLocalHeader() +
+ offsetLHToAdd - splitSigOverhead);
+ ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).setDiskNumberStart(0);
+ }
+
+ } catch (ZipException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private void updateSplitEndCentralDirectory(ZipModel zipModel) throws ZipException {
+ try {
+ if (zipModel == null) {
+ throw new ZipException("zip model is null - cannot update end of central directory for split zip model");
+ }
+
+ if (zipModel.getCentralDirectory()== null) {
+ throw new ZipException("corrupt zip model - getCentralDirectory, cannot update split zip model");
+ }
+
+ zipModel.getEndCentralDirRecord().setNoOfThisDisk(0);
+ zipModel.getEndCentralDirRecord().setNoOfThisDiskStartOfCentralDir(0);
+ zipModel.getEndCentralDirRecord().setTotNoOfEntriesInCentralDir(
+ zipModel.getCentralDirectory().getFileHeaders().size());
+ zipModel.getEndCentralDirRecord().setTotNoOfEntriesInCentralDirOnThisDisk(
+ zipModel.getCentralDirectory().getFileHeaders().size());
+
+ } catch (ZipException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private void updateSplitZip64EndCentralDirLocator(ZipModel zipModel, ArrayList fileSizeList) throws ZipException {
+ if (zipModel == null) {
+ throw new ZipException("zip model is null, cannot update split Zip64 end of central directory locator");
+ }
+
+ if (zipModel.getZip64EndCentralDirLocator() == null) {
+ return;
+ }
+
+ zipModel.getZip64EndCentralDirLocator().setNoOfDiskStartOfZip64EndOfCentralDirRec(0);
+ long offsetZip64EndCentralDirRec = 0;
+
+ for (int i = 0; i < fileSizeList.size(); i++) {
+ offsetZip64EndCentralDirRec += ((Long)fileSizeList.get(i)).longValue();
+ }
+ zipModel.getZip64EndCentralDirLocator().setOffsetZip64EndOfCentralDirRec(
+ ((Zip64EndCentralDirLocator)zipModel.getZip64EndCentralDirLocator()).getOffsetZip64EndOfCentralDirRec() +
+ offsetZip64EndCentralDirRec);
+ zipModel.getZip64EndCentralDirLocator().setTotNumberOfDiscs(1);
+ }
+
+ private void updateSplitZip64EndCentralDirRec(ZipModel zipModel, ArrayList fileSizeList) throws ZipException {
+ if (zipModel == null) {
+ throw new ZipException("zip model is null, cannot update split Zip64 end of central directory record");
+ }
+
+ if (zipModel.getZip64EndCentralDirRecord() == null) {
+ return;
+ }
+
+ zipModel.getZip64EndCentralDirRecord().setNoOfThisDisk(0);
+ zipModel.getZip64EndCentralDirRecord().setNoOfThisDiskStartOfCentralDir(0);
+ zipModel.getZip64EndCentralDirRecord().setTotNoOfEntriesInCentralDirOnThisDisk(
+ zipModel.getEndCentralDirRecord().getTotNoOfEntriesInCentralDir());
+
+ long offsetStartCenDirWRTStartDiskNo = 0;
+
+ for (int i = 0; i < fileSizeList.size(); i++) {
+ offsetStartCenDirWRTStartDiskNo += ((Long)fileSizeList.get(i)).longValue();
+ }
+
+ zipModel.getZip64EndCentralDirRecord().setOffsetStartCenDirWRTStartDiskNo(
+ ((Zip64EndCentralDirRecord)zipModel.getZip64EndCentralDirRecord()).getOffsetStartCenDirWRTStartDiskNo() +
+ offsetStartCenDirWRTStartDiskNo);
+ }
+
+ public void setComment(ZipModel zipModel, String comment) throws ZipException {
+ if (comment == null) {
+ throw new ZipException("comment is null, cannot update Zip file with comment");
+ }
+
+ if (zipModel == null) {
+ throw new ZipException("zipModel is null, cannot update Zip file with comment");
+ }
+
+ String encodedComment = comment;
+ byte[] commentBytes = comment.getBytes();
+ int commentLength = comment.length();
+
+ if (Zip4jUtil.isSupportedCharset(InternalZipConstants.CHARSET_COMMENTS_DEFAULT)) {
+ try {
+ encodedComment = new String(comment.getBytes(InternalZipConstants.CHARSET_COMMENTS_DEFAULT), InternalZipConstants.CHARSET_COMMENTS_DEFAULT);
+ commentBytes = encodedComment.getBytes(InternalZipConstants.CHARSET_COMMENTS_DEFAULT);
+ commentLength = encodedComment.length();
+ } catch (UnsupportedEncodingException e) {
+ encodedComment = comment;
+ commentBytes = comment.getBytes();
+ commentLength = comment.length();
+ }
+ }
+
+ if (commentLength > InternalZipConstants.MAX_ALLOWED_ZIP_COMMENT_LENGTH) {
+ throw new ZipException("comment length exceeds maximum length");
+ }
+
+ zipModel.getEndCentralDirRecord().setComment(encodedComment);
+ zipModel.getEndCentralDirRecord().setCommentBytes(commentBytes);
+ zipModel.getEndCentralDirRecord().setCommentLength(commentLength);
+
+ SplitOutputStream outputStream = null;
+
+ try {
+ HeaderWriter headerWriter = new HeaderWriter();
+ outputStream = new SplitOutputStream(zipModel.getZipFile());
+
+ if (zipModel.isZip64Format()) {
+ outputStream.seek(zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo());
+ } else {
+ outputStream.seek(zipModel.getEndCentralDirRecord().getOffsetOfStartOfCentralDir());
+ }
+
+ headerWriter.finalizeZipFileWithoutValidations(zipModel, outputStream);
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ } catch (IOException e) {
+ throw new ZipException(e);
+ } finally {
+ if (outputStream != null) {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+ }
+ }
+
+ public void initProgressMonitorForRemoveOp(ZipModel zipModel,
+ FileHeader fileHeader, ProgressMonitor progressMonitor) throws ZipException {
+ if (zipModel == null || fileHeader == null || progressMonitor == null) {
+ throw new ZipException("one of the input parameters is null, cannot calculate total work");
+ }
+
+ progressMonitor.setCurrentOperation(ProgressMonitor.OPERATION_REMOVE);
+ progressMonitor.setFileName(fileHeader.getFileName());
+ progressMonitor.setTotalWork(calculateTotalWorkForRemoveOp(zipModel, fileHeader));
+ progressMonitor.setState(ProgressMonitor.STATE_BUSY);
+ }
+
+ private long calculateTotalWorkForRemoveOp(ZipModel zipModel, FileHeader fileHeader) throws ZipException {
+ return Zip4jUtil.getFileLengh(new File(zipModel.getZipFile())) - fileHeader.getCompressedSize();
+ }
+
+ public void initProgressMonitorForMergeOp(ZipModel zipModel, ProgressMonitor progressMonitor) throws ZipException {
+ if (zipModel == null) {
+ throw new ZipException("zip model is null, cannot calculate total work for merge op");
+ }
+
+ progressMonitor.setCurrentOperation(ProgressMonitor.OPERATION_MERGE);
+ progressMonitor.setFileName(zipModel.getZipFile());
+ progressMonitor.setTotalWork(calculateTotalWorkForMergeOp(zipModel));
+ progressMonitor.setState(ProgressMonitor.STATE_BUSY);
+ }
+
+ private long calculateTotalWorkForMergeOp(ZipModel zipModel) throws ZipException {
+ long totSize = 0;
+ if (zipModel.isSplitArchive()) {
+ int totNoOfSplitFiles = zipModel.getEndCentralDirRecord().getNoOfThisDisk();
+ String partFile = null;
+ String curZipFile = zipModel.getZipFile();
+ int partNumber = 0;
+ for (int i = 0; i <= totNoOfSplitFiles; i++) {
+ if (partNumber == zipModel.getEndCentralDirRecord().getNoOfThisDisk()) {
+ partFile = zipModel.getZipFile();
+ } else {
+ if (partNumber >= 9) {
+ partFile = curZipFile.substring(0, curZipFile.lastIndexOf(".")) + ".z" + (partNumber+ 1);
+ } else{
+ partFile = curZipFile.substring(0, curZipFile.lastIndexOf(".")) + ".z0" + (partNumber+ 1);
+ }
+ }
+
+ totSize += Zip4jUtil.getFileLengh(new File(partFile));
+ }
+
+ }
+ return totSize;
+ }
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/util/CRCUtil.java b/lib/zip4j/src/net/lingala/zip4j/util/CRCUtil.java
new file mode 100644
index 00000000..0f30068a
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/util/CRCUtil.java
@@ -0,0 +1,85 @@
+/*
+* 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.util;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.CRC32;
+
+import net.lingala.zip4j.exception.ZipException;
+import net.lingala.zip4j.progress.ProgressMonitor;
+
+public class CRCUtil {
+
+ private static final int BUF_SIZE = 1 << 14; //16384
+
+ public static long computeFileCRC(String inputFile) throws ZipException {
+ return computeFileCRC(inputFile, null);
+ }
+
+ /**
+ * Calculates CRC of a file
+ * @param inputFile - file for which crc has to be calculated
+ * @return crc of the file
+ * @throws ZipException
+ */
+ public static long computeFileCRC(String inputFile, ProgressMonitor progressMonitor) throws ZipException {
+
+ if (!Zip4jUtil.isStringNotNullAndNotEmpty(inputFile)) {
+ throw new ZipException("input file is null or empty, cannot calculate CRC for the file");
+ }
+ InputStream inputStream = null;
+ try {
+ Zip4jUtil.checkFileReadAccess(inputFile);
+
+ inputStream = new FileInputStream(new File(inputFile));
+
+ byte[] buff = new byte[BUF_SIZE];
+ int readLen = -2;
+ CRC32 crc32 = new CRC32();
+
+ while ((readLen = inputStream.read(buff)) != -1) {
+ crc32.update(buff, 0, readLen);
+ if (progressMonitor != null) {
+ progressMonitor.updateWorkCompleted(readLen);
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return 0;
+ }
+ }
+ }
+
+ return crc32.getValue();
+ } catch (IOException e) {
+ throw new ZipException(e);
+ } catch (Exception e) {
+ throw new ZipException(e);
+ } finally {
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ throw new ZipException("error while closing the file after calculating crc");
+ }
+ }
+ }
+ }
+
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/util/InternalZipConstants.java b/lib/zip4j/src/net/lingala/zip4j/util/InternalZipConstants.java
new file mode 100644
index 00000000..143b259e
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/util/InternalZipConstants.java
@@ -0,0 +1,174 @@
+/*
+* 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.util;
+
+public interface InternalZipConstants {
+
+ /*
+ * Header signatures
+ */
+ // Whenever a new Signature is added here, make sure to add it
+ // in Zip4jUtil.getAllHeaderSignatures()
+ static long LOCSIG = 0x04034b50L; // "PK\003\004"
+ static long EXTSIG = 0x08074b50L; // "PK\007\008"
+ static long CENSIG = 0x02014b50L; // "PK\001\002"
+ static long ENDSIG = 0x06054b50L; // "PK\005\006"
+ static long DIGSIG = 0x05054b50L;
+ static long ARCEXTDATREC = 0x08064b50L;
+ static long SPLITSIG = 0x08074b50L;
+ static long ZIP64ENDCENDIRLOC = 0x07064b50L;
+ static long ZIP64ENDCENDIRREC = 0x06064b50;
+ static int EXTRAFIELDZIP64LENGTH = 0x0001;
+ static int AESSIG = 0x9901;
+
+ /*
+ * Header sizes in bytes (including signatures)
+ */
+ static final int LOCHDR = 30; // LOC header size
+ static final int EXTHDR = 16; // EXT header size
+ static final int CENHDR = 46; // CEN header size
+ static final int ENDHDR = 22; // END header size
+
+ /*
+ * Local file (LOC) header field offsets
+ */
+ static final int LOCVER = 4; // version needed to extract
+ static final int LOCFLG = 6; // general purpose bit flag
+ static final int LOCHOW = 8; // compression method
+ static final int LOCTIM = 10; // modification time
+ static final int LOCCRC = 14; // uncompressed file crc-32 value
+ static final int LOCSIZ = 18; // compressed size
+ static final int LOCLEN = 22; // uncompressed size
+ static final int LOCNAM = 26; // filename length
+ static final int LOCEXT = 28; // extra field length
+
+ /*
+ * Extra local (EXT) header field offsets
+ */
+ static final int EXTCRC = 4; // uncompressed file crc-32 value
+ static final int EXTSIZ = 8; // compressed size
+ static final int EXTLEN = 12; // uncompressed size
+
+ /*
+ * Central directory (CEN) header field offsets
+ */
+ static final int CENVEM = 4; // version made by
+ static final int CENVER = 6; // version needed to extract
+ static final int CENFLG = 8; // encrypt, decrypt flags
+ static final int CENHOW = 10; // compression method
+ static final int CENTIM = 12; // modification time
+ static final int CENCRC = 16; // uncompressed file crc-32 value
+ static final int CENSIZ = 20; // compressed size
+ static final int CENLEN = 24; // uncompressed size
+ static final int CENNAM = 28; // filename length
+ static final int CENEXT = 30; // extra field length
+ static final int CENCOM = 32; // comment length
+ static final int CENDSK = 34; // disk number start
+ static final int CENATT = 36; // internal file attributes
+ static final int CENATX = 38; // external file attributes
+ static final int CENOFF = 42; // LOC header offset
+
+ /*
+ * End of central directory (END) header field offsets
+ */
+ static final int ENDSUB = 8; // number of entries on this disk
+ static final int ENDTOT = 10; // total number of entries
+ static final int ENDSIZ = 12; // central directory size in bytes
+ static final int ENDOFF = 16; // offset of first CEN header
+ static final int ENDCOM = 20; // zip file comment length
+
+ static final int STD_DEC_HDR_SIZE = 12;
+
+ //AES Constants
+ static final int AES_AUTH_LENGTH = 10;
+ static final int AES_BLOCK_SIZE = 16;
+
+ static final int MIN_SPLIT_LENGTH = 65536;
+
+ static final long ZIP_64_LIMIT = 4294967295L;
+
+ public static String OFFSET_CENTRAL_DIR = "offsetCentralDir";
+
+ public static final String VERSION = "1.3.2";
+
+ public static final int MODE_ZIP = 1;
+
+ public static final int MODE_UNZIP = 2;
+
+ public static final String WRITE_MODE = "rw";
+
+ public static final String READ_MODE = "r";
+
+ public static final int BUFF_SIZE = 1024 * 4;
+
+ public static final int FILE_MODE_NONE = 0;
+
+ public static final int FILE_MODE_READ_ONLY = 1;
+
+ public static final int FILE_MODE_HIDDEN = 2;
+
+ public static final int FILE_MODE_ARCHIVE = 32;
+
+ public static final int FILE_MODE_READ_ONLY_HIDDEN = 3;
+
+ public static final int FILE_MODE_READ_ONLY_ARCHIVE = 33;
+
+ public static final int FILE_MODE_HIDDEN_ARCHIVE = 34;
+
+ public static final int FILE_MODE_READ_ONLY_HIDDEN_ARCHIVE = 35;
+
+ public static final int FILE_MODE_SYSTEM = 38;
+
+ public static final int FOLDER_MODE_NONE = 16;
+
+ public static final int FOLDER_MODE_HIDDEN = 18;
+
+ public static final int FOLDER_MODE_ARCHIVE = 48;
+
+ public static final int FOLDER_MODE_HIDDEN_ARCHIVE = 50;
+
+ // Update local file header constants
+ // This value holds the number of bytes to skip from
+ // the offset of start of local header
+ public static final int UPDATE_LFH_CRC = 14;
+
+ public static final int UPDATE_LFH_COMP_SIZE = 18;
+
+ public static final int UPDATE_LFH_UNCOMP_SIZE = 22;
+
+ public static final int LIST_TYPE_FILE = 1;
+
+ public static final int LIST_TYPE_STRING = 2;
+
+ public static final int UFT8_NAMES_FLAG = 1 << 11;
+
+ public static final String CHARSET_UTF8 = "UTF8";
+
+ public static final String CHARSET_CP850 = "Cp850";
+
+ public static final String CHARSET_COMMENTS_DEFAULT = "windows-1254";
+
+ public static final String CHARSET_DEFAULT = System.getProperty("file.encoding");
+
+ public static final String FILE_SEPARATOR = System.getProperty("file.separator");
+
+ public static final String ZIP_FILE_SEPARATOR = "/";
+
+ public static final String THREAD_NAME = "Zip4j";
+
+ public static final int MAX_ALLOWED_ZIP_COMMENT_LENGTH = 0xFFFF;
+}
diff --git a/lib/zip4j/src/net/lingala/zip4j/util/Raw.java b/lib/zip4j/src/net/lingala/zip4j/util/Raw.java
new file mode 100644
index 00000000..b043b70a
--- /dev/null
+++ b/lib/zip4j/src/net/lingala/zip4j/util/Raw.java
@@ -0,0 +1,184 @@
+/*
+* 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.util;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import net.lingala.zip4j.exception.ZipException;
+
+public class Raw
+{
+ public static long readLongLittleEndian(byte[] array,int pos){
+ long temp = 0;
+ temp |= array[pos+7]&0xff;
+ temp <<=8;
+ temp |= array[pos+6]&0xff;
+ temp <<=8;
+ temp |= array[pos+5]&0xff;
+ temp <<=8;
+ temp |= array[pos+4]&0xff;
+ temp <<=8;
+ temp |= array[pos+3]&0xff;
+ temp <<=8;
+ temp |= array[pos+2]&0xff;
+ temp <<=8;
+ temp |= array[pos+1]&0xff;
+ temp <<=8;
+ temp |= array[pos]&0xff;
+ return temp;
+ }
+
+ public static int readLeInt(DataInput di, byte[] b) throws ZipException{
+ try {
+ di.readFully(b, 0, 4);
+ } catch (IOException e) {
+ throw new ZipException(e);
+ }
+ return ((b[0] & 0xff) | (b[1] & 0xff) << 8)
+ | ((b[2] & 0xff) | (b[3] & 0xff) << 8) << 16;
+ }
+
+ public static int readShortLittleEndian(byte[] b, int off){
+ return (b[off] & 0xff) | (b[off+1] & 0xff) << 8;
+ }
+
+ public static final short readShortBigEndian(byte[] array, int pos) {
+ short temp = 0;
+ temp |= array[pos] & 0xff;
+ temp <<= 8;
+ temp |= array[pos + 1] & 0xff;
+ return temp;
+ }
+
+ public static int readIntLittleEndian(byte[] b, int off){
+ return ((b[off] & 0xff) | (b[off+1] & 0xff) << 8)
+ | ((b[off+2] & 0xff) | (b[off+3] & 0xff) << 8) << 16;
+ }
+
+ public static byte[] toByteArray(int in,int outSize) {
+ byte[] out = new byte[outSize];
+ byte[] intArray = toByteArray(in);
+ for( int i=0; i
+ *
+ * Note: Relative path has to be passed as the fileName
+ *
+ * @param zipModel
+ * @param fileName
+ * @throws ZipException
+ */
+ private void removeFilesIfExists(ArrayList fileList, ZipParameters parameters, ProgressMonitor progressMonitor) throws ZipException {
+
+ if (zipModel == null || zipModel.getCentralDirectory() == null ||
+ zipModel.getCentralDirectory().getFileHeaders() == null ||
+ zipModel.getCentralDirectory().getFileHeaders().size() <= 0) {
+ //For a new zip file, this condition satisfies, so do nothing
+ return;
+ }
+ RandomAccessFile outputStream = null;
+
+ try {
+ for (int i = 0; i < fileList.size(); i++) {
+ File file = (File) fileList.get(i);
+
+ String fileName = Zip4jUtil.getRelativeFileName(file.getAbsolutePath(),
+ parameters.getRootFolderInZip(), parameters.getDefaultFolderPath());
+
+ FileHeader fileHeader = Zip4jUtil.getFileHeader(zipModel, fileName);
+ if (fileHeader != null) {
+
+ if (outputStream != null) {
+ outputStream.close();
+ outputStream = null;
+ }
+
+ ArchiveMaintainer archiveMaintainer = new ArchiveMaintainer();
+ progressMonitor.setCurrentOperation(ProgressMonitor.OPERATION_REMOVE);
+ HashMap retMap = archiveMaintainer.initRemoveZipFile(zipModel,
+ fileHeader, progressMonitor);
+
+ if (progressMonitor.isCancelAllTasks()) {
+ progressMonitor.setResult(ProgressMonitor.RESULT_CANCELLED);
+ progressMonitor.setState(ProgressMonitor.STATE_READY);
+ return;
+ }
+
+ progressMonitor
+ .setCurrentOperation(ProgressMonitor.OPERATION_ADD);
+
+ if (outputStream == null) {
+ outputStream = prepareFileOutputStream();
+
+ if (retMap != null) {
+ if (retMap.get(InternalZipConstants.OFFSET_CENTRAL_DIR) != null) {
+ long offsetCentralDir = -1;
+ try {
+ offsetCentralDir = Long
+ .parseLong((String) retMap
+ .get(InternalZipConstants.OFFSET_CENTRAL_DIR));
+ } catch (NumberFormatException e) {
+ throw new ZipException(
+ "NumberFormatException while parsing offset central directory. " +
+ "Cannot update already existing file header");
+ } catch (Exception e) {
+ throw new ZipException(
+ "Error while parsing offset central directory. " +
+ "Cannot update already existing file header");
+ }
+
+ if (offsetCentralDir >= 0) {
+ outputStream.seek(offsetCentralDir);
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (IOException e) {
+ throw new ZipException(e);
+ } finally {
+ if (outputStream != null) {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+ }
+ }
+
+ private RandomAccessFile prepareFileOutputStream() throws ZipException {
+ String outPath = zipModel.getZipFile();
+ if (!Zip4jUtil.isStringNotNullAndNotEmpty(outPath)) {
+ throw new ZipException("invalid output path");
+ }
+
+ try {
+ File outFile = new File(outPath);
+ if (!outFile.getParentFile().exists()) {
+ outFile.getParentFile().mkdirs();
+ }
+ return new RandomAccessFile(outFile, InternalZipConstants.WRITE_MODE);
+ } catch (FileNotFoundException e) {
+ throw new ZipException(e);
+ }
+ }
+
+ private EndCentralDirRecord createEndOfCentralDirectoryRecord() {
+ EndCentralDirRecord endCentralDirRecord = new EndCentralDirRecord();
+ endCentralDirRecord.setSignature(InternalZipConstants.ENDSIG);
+ endCentralDirRecord.setNoOfThisDisk(0);
+ endCentralDirRecord.setTotNoOfEntriesInCentralDir(0);
+ endCentralDirRecord.setTotNoOfEntriesInCentralDirOnThisDisk(0);
+ endCentralDirRecord.setOffsetOfStartOfCentralDir(0);
+ return endCentralDirRecord;
+ }
+
+ private long calculateTotalWork(ArrayList fileList, ZipParameters parameters) throws ZipException {
+ if (fileList == null) {
+ throw new ZipException("file list is null, cannot calculate total work");
+ }
+
+ long totalWork = 0;
+
+ for (int i = 0; i < fileList.size(); i++) {
+ if(fileList.get(i) instanceof File) {
+ if (((File)fileList.get(i)).exists()) {
+ if (parameters.isEncryptFiles() &&
+ parameters.getEncryptionMethod() == Zip4jConstants.ENC_METHOD_STANDARD) {
+ totalWork += (Zip4jUtil.getFileLengh((File)fileList.get(i)) * 2);
+ } else {
+ totalWork += Zip4jUtil.getFileLengh((File)fileList.get(i));
+ }
+
+ if (zipModel.getCentralDirectory() != null &&
+ zipModel.getCentralDirectory().getFileHeaders() != null &&
+ zipModel.getCentralDirectory().getFileHeaders().size() > 0) {
+ String relativeFileName = Zip4jUtil.getRelativeFileName(
+ ((File)fileList.get(i)).getAbsolutePath(), parameters.getRootFolderInZip(), parameters.getDefaultFolderPath());
+ FileHeader fileHeader = Zip4jUtil.getFileHeader(zipModel, relativeFileName);
+ if (fileHeader != null) {
+ totalWork += (Zip4jUtil.getFileLengh(new File(zipModel.getZipFile())) - fileHeader.getCompressedSize());
+ }
+ }
+ }
+ }
+ }
+
+ return totalWork;
+ }
+}
diff --git a/src/itdelatrisu/opsu/OszUnpacker.java b/src/itdelatrisu/opsu/OszUnpacker.java
new file mode 100644
index 00000000..5acb5084
--- /dev/null
+++ b/src/itdelatrisu/opsu/OszUnpacker.java
@@ -0,0 +1,110 @@
+/*
+ * opsu! - an open-source osu! client
+ * Copyright (C) 2014 Jeffrey Han
+ *
+ * opsu! is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * opsu! is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with opsu!. If not, see