Here you can find the source of getInputStream(URLConnection paramURLConnection)
private static InputStream getInputStream(URLConnection paramURLConnection) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.io.InputStream; import java.net.URLConnection; import java.util.zip.GZIPInputStream; import java.util.zip.InflaterInputStream; public class Main { private static InputStream getInputStream(URLConnection paramURLConnection) throws IOException { InputStream stream = paramURLConnection.getInputStream(); String encoding = paramURLConnection.getContentEncoding(); if (encoding != null) { encoding = encoding.toLowerCase(); if (encoding.contains("gzip")) { stream = new GZIPInputStream(stream); } else if (encoding.contains("deflate")) { stream = new InflaterInputStream(stream); }/*ww w . j av a 2 s . c om*/ } return stream; } }