private String inflateGzipToString(InputStream is) throws IOException {
  GZIPInputStream gis=new GZIPInputStream(is);
  ByteArrayOutputStream os=new ByteArrayOutputStream();
  byte[] buffer=new byte[1024];
  while (true) {
    int bytesRead=gis.read(buffer);
    if (bytesRead == -1)     break;
    os.write(buffer,0,bytesRead);
  }
  return os.toString();
}

private String inflateGzipToString ( InputStream is ) throws IOException { GZIPInputStream gis = new GZIPInputStream ( is ) ; ByteArrayOutputStream os = new ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ 1024 ] ; while ( true ) { int bytesRead = gis . read ( buffer ) ; if ( bytesRead == - 1 ) break ; os . write ( buffer , 0 , bytesRead ) ; } return os . toString ( ) ; }
inflate a gzipped inputstream and return it as a string .
