tar.gz ????? ?? ??????
Contents
[
Hide
Show
]??? Tar.gz ????? ?? ????? ?????? ??? ?????.
??
aspose.zip api? tararchive ???? ???? ?? ??? ???? ?? ????? ???? ?????.�?? ???? ???? ?? ???? ?? ????? ???? ?? ? TAR ????? ??? ?? ??? ? ????.
?? ??? ??? ????? ??? ?? ???? ??? ??????.
?? ??
?? ?? ??? ?? tar.gz ?????? ??? ???? ?? TAR ????? ?? ??? ?????. savegzipped ???? ???? ????? GZ? ?????.
1String [] archivesPaths = new String [] { "data/first.tar.gz", "data/second.tar.gz", "data/third.tar.gz"};
2tararchive [] archives = ??? tararchive [archives spaths.length];
3try (tararchive menged = new tararchive ()) {
4 for (int i = 0; i <archives spaths.length; i ++) {
5 tararchive a = tararchive.fromgzip (ArchivesPaths [i]);
6 ???? [i] = a;
7 for (tarentry ?? : a.getentries ()) {
8 merged.createEntry (entry.getname (), entery.open ());
9 }
10 }
11
12 merged.saveGzipped("merged.tar.gz");
13
14 for (int i = 0; i < archivesPaths.length; i++) {
15 archives[i].close();
16 }
17}?? ??????? ??? ??
??? ?? ??? ???? tar.lz, tar.xz? ?? ? ? ????.