We can use BufferedReader with FileInputStreamReader to read InputStream line by line. BufferedReader bufferReader = new BufferedReader(new InputStreamReader(inputStream)); while(bufferReader.ready()) { String line = bufferReader.readLine(); }