Here you can find the source of getGzipInputStream(File file)
Parameter | Description |
---|---|
file | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
FileNotFoundException | an exception |
private static InputStream getGzipInputStream(File file) throws IOException, FileNotFoundException
//package com.java2s; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.zip.GZIPInputStream; public class Main { /**/*w ww. ja v a 2 s .co m*/ * Returns a GZIPInputStream for a .gz file * * @param file * @return * @throws IOException * @throws FileNotFoundException */ private static InputStream getGzipInputStream(File file) throws IOException, FileNotFoundException { return new GZIPInputStream(new FileInputStream(file)); } }