???????????? rar ?? ?????????

Contents
[ Hide Show ]

???? ?? ?????? ??????????? ????? RAR ?? Zip, ?????????? ?? ??????.

???????????

Aspose.zip API ????? rararchive ???? ??? ????????? ??????? RAR.�?? ?????? ????????? ????? ? ???’???, ?? ?????????? ???? ? ?????????? ??????? ?? ??????? ??????? ? Zip Archive.

?????????????, ?? ? ??? ? ???????? ?????????? ???�???, ??? ???????? ????? ???? ???????.

?????????? ?????

????????? ??????? ???? ??????????, ?? ?????????? ?????? ? ?????? RAR ? ??????? ????????? ???? ?? Zip Archive. ??????, ?????? ???????? ? ??????? ????? ?????, ??? ??????? ???? ???.

 1????????? (Archive Zip = ????? Archive ()) {
 2    ????????? (rararchive rar = ????? rararchive ("d: \\ archvie.rar") {
 3        for (int i = 0; i <rar.getentries (). size (); i ++) {
 4            Rararchiveentry entry = rar.getentries (). Get (i);
 5            if (! entry.isdirectory ()) {
 6                ????????? (bytearrayoutputstream = ????? bytearrayoutputstream ()) {
 7                    entry.extract (out);
 8                    ????????? (bytearrayinputstream in = ????? bytearrayinputstream (out.tobytearray ()) {
 9                        Zip.CreateEntry (entry.getName (), IN);
10                    }
11                }
12            } else {
13                Zip.CreateEntry (entry.getName () + "/", ????? ByTeArrayInputStream (????? ???? [0]));
14            }
15        }
16    }
17    Zip.save ("output.zip");
18} ???? (IOException ex) {
19    System.out.println (ex);
20}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.