- Messages
- 5,508
- Reaction score
- 35
- Points
- 48
Is there any way of doing this?
I found http://sourceforge.net/projects/java-unrar/, but there is no documentation :/
Edit: ok I think I got some of the lib now, how correct is this:
It gives me:
I found http://sourceforge.net/projects/java-unrar/, but there is no documentation :/
Edit: ok I think I got some of the lib now, how correct is this:
Code:
public static void unrar () throws RarException, IOException {
String output = "C:\\Users\\vigge_sWe\\Desktop\\test\\";
Archive arch = new Archive(new File("C:\\test.rar"));
List<FileHeader> headers = arch.getFileHeaders();
Iterator<FileHeader> iterator = headers.iterator();
FileOutputStream os = new FileOutputStream(new File(output));
while ( iterator.hasNext() ){
arch.extractFile(iterator.next(), os);
}
}
It gives me:
java.io.FileNotFoundException: C:\Users\vigge_sWe\Desktop\test (Access is denied)
Last edited: