??? ??????? ??? ????????? ?????? ? ??????? Java
?????
? ???? ?????? ???????????, ??? ????? ??? ????????? ??????. ??? ?????? ????? ???? ????????? Zip ? RAR. ?? ?????????? ????????? ????.
Format: Zip
Format: Zip - ??????
Format: rar
?????? ????, ???????????? ???? ???????.
Java ?????? ??? ?????????? ???????
?? ???? ???????? ????????, ??? ????????? ??????????? ???????? ???????? ? Java, ????????? aspose.zip ??? java. ????? Aspose.zip ????? ???? ???????? ? ??? Java Project, ????????? ????????? ?????????? ????????? aspose.zip ??? java
??? ?????????? ????? ? Java
- ???????? ????????? Archive ??????.
- ???????? ????? ? ?????????????? ?????? archive.createEntry.
- ???????????? ?????, ????????? ????? archive.save.
1?????????? (Archive Archive = new Archive ()) {
2 archive.createEntry ("intrint_name1.dat", "input_file1.dat");
3 archive.createEntry ("intrint_name2.dat", "input_file2.dat");
4 archive.save ("result_archive.zip");
5}??????????? ?????? ?????? ??????? ??????? ????? ZIP ? ?????????????? ????????? ?????? ?????????????? ? ??? ??????????.
??? ???????????? ????? ? Java
<a name = “java-unzip-file-to-to-??????” id = “java-unzip-file-to-?????
- ???????? ????????? Archive ?????? ? ????? ?????? _ZIP.
- ????????? ????? zip file ? ??????? archive.extracttodirectory ? ????? ?????.
1try (archive archive = new Archive ("input_archive.zip")) {
2 archive.extracttodirectory ("\\ outputDirectory");
3}???????? ????? ??????????? ????? ??????? ????? ????? ZIP. Archivelodoptions ?????? ???? ???????????? ? ???????? ??????? ????????? ? ?????? ?????? ?????? ????? (??. ?????? ????).
??? ?????????? ????? ? ??????? ? Java
????: ??????? ???? ZIP ? ??????? ? Java
- ???????? ????????? Archive ??????.
- ???????? ??? ArchiveEntrySettings ? ???????? EncryptionSettings ? ???????? TradentialEncryptionsettings, ???? password.
- ???????? ??????? ??????, ???????? ?? ?????? Archive.createEntry.
- ????????? ??? ??? zip file ? ??????? ?????? archive.save.
1?????????? (Archive Archive = New Archive (New ArchiveEntrySettings (NULL, New TradentialEncryptionsettings ("pass"))) {
2 archive.createEntry ("intrint_name1.dat", "input_file1.dat");
3 archive.createEntry ("intrint_name2.dat", "input_file2.dat");
4 archive.save ("result_archive.zip");
5}???????? EncryptionSettings ???????????? ??? ???????? ??????????? ??????? ?????? ZIP.
??? ???????????? ????? ? ??????? ? Java
????: unzip ?????? ??????? Zip-???? ? ?????????????? java
- ???????? ????????? Archive ??????.
- ?????????? ??? ?????? ArchiveAdoptions ? ?????????? ?????? ??? ??????????? ??????? ? ??????? setDecryptionPassword ????? ? ????? ?????? Zip Password.
- ????????? ????? zip file ? ??????? archive.extracttodirectory ? ????? ?????.
1Archiveloadoptions Options = new ArchiveLodoptions ();
2Options.SetDecryptionPassword ("pass");
3try (archive archive = new Archive ("input_archive.zip", Options)) {
4 archive.extracttodirectory ("\\ outputDirectory");
5}Archiveloadoptions ? ??????? ??????? ??????????? ???????????? ??? ???????? ??????????? ??????? ?????? ZIP.
??? ??????? ????? RAR ? Java
- ???????? ????????? Rararchive ?????? ? ????? rar file.
- ????????? ?????????? rar file, ??????? ????? rararchive.extracttodirectory.
1try (rararchive archive = new Rararchive ("input_archive.rar")) {
2 archive.extracttodirectory ("\\ outputDirectory");
3}? ??????????? ???? ??????? Rararchive Class Constructor ????????? ?? ?????????? ????? RAR.
???????? ?????
??? ?????? ????? ?????????? ??? ????. ???? ????? ??, ??? ? ????.
Format: Zip
Compression
Compression Password Protected
Extraction Password Protected
Format: rar