Code example for GZIPInputStream

0
        if(null == (is = con.getErrorStream())){
            is = con.getInputStream();
        } 
        if (null != is && "gzip".equals(con.getContentEncoding())) {
            // the response is gzipped 
            is = new GZIPInputStream(is);
        } 
    } 
 
    // for test purpose 
    /*package*/ Response(String content) {
        this.responseAsString = content;
    } 
 
    public int getStatusCode() { 
        return statusCode;
    } 
 
    public String getResponseHeader(String name) {
    	if (con != null)
    		return con.getHeaderField(name);