Here you can find the source of getGZipInputStream(InputStream in)
Parameter | Description |
---|---|
in | The raw input stream |
Parameter | Description |
---|---|
IOException | if an I/O error has occurred |
public static GZIPInputStream getGZipInputStream(InputStream in) throws IOException
//package com.java2s; // License: GPL. For details, see LICENSE file. import java.io.IOException; import java.io.InputStream; import java.util.zip.GZIPInputStream; public class Main { /**/*from w w w. j av a 2s . c o m*/ * Returns a Gzip input stream wrapping given input stream. * @param in The raw input stream * @return a Gzip input stream wrapping given input stream, or {@code null} if {@code in} is {@code null} * @throws IOException if an I/O error has occurred * @since 7119 */ public static GZIPInputStream getGZipInputStream(InputStream in) throws IOException { if (in == null) { return null; } return new GZIPInputStream(in); } }