ArchiveInputStream input;
/* I am really sad that classes aren't first-class objects in
Java :'( */
try {
input = new TarArchiveInputStream(new GzipCompressorInputStream(new FileInputStream(file)));
} catch (IOException e) {
try {
input = new TarArchiveInputStream(new BZip2CompressorInputStream(new FileInputStream(file)));
} catch (IOException e2) {
input = new ZipArchiveInputStream(new FileInputStream(file));
}
}