RAR????????
Contents
[
Hide
Show
]??
Aspose.Zip API?????????????????????????????????????????????????�Aspose.Zip API?? Rararchive????RAR?????????????��API?? RararchiveEntry?????????RAR????????????????????
RAR???????????????
???????
???????????????????????????????????????????
1try(rararchive archive = new Rararchive( "archive.rar")){
2 try(fileoutputStream destination = new fileoutputStream(datadir + "firstentry.txt")){
3 try(inputstream source = archive.getentries()?get(0).open()){
4 byte [] b = new byte [1024];
5 int bytesRead;
6 while(0 <(bytesread = source.read(b?0?b.length))){
7 destination.write(b?0?bytesread);
8 }
9 }
10 }
11} catch(ioException ex){
12 System.out.println(ex);
13}?????????????
?????????arrarchive????????????????????????????????????
1????fi = new file( "necrypted.rar");
2try(rararchive archive = new Rararchive(files.newinputStream(fi.topath()))){
3 try(fileoutputStream destination = new fileoutputStream(datadir + "firstentry.txt")){
4 archive.getentries()?get(0).extrage(destination? "p@s $ w0rd");
5 }
6} catch(ioException ex){
7 System.out.println(ex);
8}???????????
?????????Rararchive????????????????????????????
1try(rararchive archive = new Rararchive( "archive.rar")){
2 archive.extracttodirectory( "??");
3}