Child: [r4] (diff)

Download this file

ExtractExample.java    22 lines (13 with data), 637 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
package utils;
import java.io.File;
import java.io.IOException;
import org.rauschig.jarchivelib.Archiver;
import org.rauschig.jarchivelib.ArchiverFactory;
public class ExtractExample {
public static void main(String[] args) throws IOException{
File archive = new File("/home/nuno/source/tool/run/downloads/jfreechart-1.0.17.tar.gz");
File destination = new File("/home/nuno/source/tool/run/downloads/output/");
Archiver archiver = ArchiverFactory.createArchiver("tar", "gz");
archiver.extract(archive, destination);
}
}