GZIPInputStream to String
To decode bytes from an InputStream, you can use an InputStreamReader. Then, a BufferedReader will allow you to read your stream line by line. Your code will look like: ByteArrayInputStream bais = new ByteArrayInputStream(responseBytes); GZIPInputStream gzis = new GZIPInputStream(bais); InputStreamReader reader = new InputStreamReader(gzis); BufferedReader in = new BufferedReader(reader); String readed; while ((readed = in.readLine()) … Read more