Java examples for File Path IO:GZIP
gets an InputStream from a file that is gzip compressed.
//package com.java2s; import java.io.*; import java.util.zip.GZIPInputStream; public class Main { /**// ww w .ja va 2 s. c o m * gets an InputStream from a file that is gzip compressed. * * @param file * @return * @throws IOException */ public static InputStream getCompressedFileAsStream(final File file) throws IOException { return new GZIPInputStream(new BufferedInputStream( new FileInputStream(file))); } }