Search Java Code Snippets

  Help us in improving the repository. Add new snippets through 'Submit Code Snippet ' link.

Java - Code Samples

 Sample 1. Code Sample / Example / Snippet of org.apache.commons.compress.compressors.CompressorInputStream

    public void testBzip2Unarchive() throws Exception {

final File input = getFile("bla.txt.bz2");

final File output = new File(dir, "bla.txt");

final InputStream is = new FileInputStream(input);

final CompressorInputStream in = new CompressorStreamFactory().createCompressorInputStream("bzip2", is);

final FileOutputStream os = new FileOutputStream(output);

IOUtils.copy(in, os);




   Like      Feedback      org.apache.commons.compress.compressors.CompressorInputStream

Subscribe to Java News and Posts. Get latest updates and posts on Java from
Enter your email address:
Delivered by FeedBurner

comments powered by Disqus