RAR? ??? ?????
Contents
[
Hide
Show
]RAR ????? ??? ?????? ??? ?????.
??
aspose.zip api? rararchive ???? ???? RAR ????? ?????.�?? ???? ???? ?? ???? ?? ??? ???? ?? Zip Archive? ??? ? ????.
?? ??? ??? ????? ??? ?? ???? ??? ??????.
?? ??
?? ?? ??? RAR ?????? ??? ???? ?? Zip Archive? ?? ??? ?????. ?? ???? ?? ? ???? ? ??? ??? ??? ?????.
1try (archive zip = new Archive ()) {
2 try (rararchive rar = new rararchive ( "d : \\ archvie.rar")) {
3 for (int i = 0; i <rar.getentries (). size (); i ++) {
4 rararchiveEntry entry = rar.getentries (). get (i);
5 if (! enther.isdirectory ()) {
6 try (bytearrayoutputStream out = new BytearRayoutputStream ()) {
7 Entrystract (out);
8 try (bytearrayinputstream in = new BytearrayinputStream (out.tobytearray ())) {
9 Zip.CreateEntry (Entry.GetName (), in);
10 }
11 }
12 } ? ?? {
13 Zip.CreateEntry (Entry.GetName () + "/", New ByTearRayInputStream (New Byte [0]);
14 }
15 }
16 }
17 zip.save ( "output.zip");
18} catch (ioException ex) {
19 System.out.println (?);
20}