private String readResponseFromServer(HttpURLConnection urlConnection) throws RequestFailureException {
  try {
    InputStreamReader reader=new InputStreamReader(urlConnection.getInputStream());
    BufferedReader in=new BufferedReader(reader);
    try {
      StringBuilder response=new StringBuilder();
      for (String line=in.readLine(); line != null; line=in.readLine()) {
        response.append(line);
      }
      checkServerResponseCode(urlConnection);
      return response.toString();
    }
  finally {
      in.close();
    }
  }
 catch (  IOException e) {
    throw new RequestFailureException("Failed when reading response from server: ",e);
  }
}

private String readResponseFromServer ( HttpURLConnection urlConnection ) throws RequestFailureException { try { InputStreamReader reader = new InputStreamReader ( urlConnection . getInputStream ( ) ) ; BufferedReader in = new BufferedReader ( reader ) ; try { StringBuilder response = new StringBuilder ( ) ; for ( String line = in . readLine ( ) ; line != null ; line = in . readLine ( ) ) { response . append ( line ) ; } checkServerResponseCode ( urlConnection ) ; return response . toString ( ) ; } finally { in . close ( ) ; } } catch ( IOException e ) { throw new RequestFailureException ( "Failed when reading response from server: " , e ) ; } }
reads the response from the omaha server .
