code: public static InputStream getInputStream(URL url, boolean acceptGzipEncoding, int timeout) throws IOException {
  		InputStream inStream = null ;
  		URLConnection huc = URLConnectionTools.openURLConnection(url,timeout);
  
  		if ( acceptGzipEncoding) huc.setRequestProperty("Accept-Encoding", "gzip");
  
  		String contentEncoding = huc.getContentEncoding();
  
  		inStream = huc.getInputStream();
  
  		if (contentEncoding != null) {
  			if (contentEncoding.contains("gzip")) {
  				inStream = new GZIPInputStream(inStream);
  			}
  		}
  
  		return inStream;
  
  	}
docs: Open a URL and return an InputStream to it
  if acceptGzipEncoding == true, use GZIPEncoding to
  compress communication.
  <p>
  The caller is responsible to close the returned InputStream not to cause
  resource leaks.
  @param url the input URL to be read
  @param acceptGzipEncoding whether to accept Gzip encoding
  @param timeout
  @return an {@link InputStream} of response
  @throws IOException due to an error opening the URL