app/src/main/java/com/example/android/quakereport/QueryUtils.java
private static String readFromStream(InputStream inputStream) throws IOException
    {
        StringBuilder output = new StringBuilder();
        if (inputStream != null)
        {
            InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName("UTF-8"));
            BufferedReader reader = new BufferedReader(inputStreamReader);
            String line = reader.readLine();
            while (line != null)
            {
                output.append(line);
                line = reader.readLine();
            }
        }
        return output.toString();
    }
/**
     * Convert the {@link InputStream} into a String which contains the
     * whole JSON response from the server.
     */
Convert the  InputStream into a String which contains the
whole JSON response from the server.
Convert the InputStream into a String which contains the whole JSON response from the server .
private static String readFromStream(InputStream inputStream) throws IOException
    {
        StringBuilder output = new StringBuilder();
        if (inputStream != null)
        {
            InputStreamReader inputStreamReader = new InputStreamReader(inputStream, Charset.forName("UTF-8"));
            BufferedReader reader = new BufferedReader(inputStreamReader);
            String line = reader.readLine();
            while (line != null)
            {
                output.append(line);
                line = reader.readLine();
            }
        }
        return output.toString();
    }
private static String readFromStream ( InputStream inputStream ) throws IOException { StringBuilder output = new StringBuilder ( ) ; if ( inputStream != null ) { InputStreamReader inputStreamReader = new InputStreamReader ( inputStream , Charset . forName ( "UTF-8" ) ) ; BufferedReader reader = new BufferedReader ( inputStreamReader ) ; String line = reader . readLine ( ) ; while ( line != null ) { output . append ( line ) ; line = reader . readLine ( ) ; } } return output . toString ( ) ; }
Convert the {@link InputStream} into a String which contains the
 whole JSON response from the server.
Convert the { @link InputStream } into a String which contains the whole JSON response from the server .