private InputStream getErrorStream ( ) { InputStream errorStream = this . connection . getErrorStream ( ) ; if ( errorStream != null ) { final String contentEncoding = this . connection . getContentEncoding ( ) ; if ( contentEncoding != null && contentEncoding . equalsIgnoreCase ( "gzip" ) ) { try { errorStream = new GZIPInputStream ( errorStream ) ; } catch ( IOException e ) { // just return the error stream as is } } } return errorStream ; }
Returns the response error stream handling the case when it contains gzipped data .