private static String dl(HttpsURLConnection con) throws IOException {
  StringBuilder response=new StringBuilder();
  BufferedReader in=null;
  try {
    con.setRequestMethod("GET");
    con.setRequestProperty("User-Agent",USER_AGENT);
    in=new BufferedReader(new InputStreamReader(con.getInputStream()));
    String inputLine;
    while ((inputLine=in.readLine()) != null) {
      response.append(inputLine);
    }
  }
 catch (  UnknownHostException uhe) {
    throw new IOException("unknown host or no network",uhe);
  }
catch (  Exception e) {
    throw new IOException(e);
  }
 finally {
    if (in != null) {
      in.close();
    }
  }
  return response.toString();
}

private static String dl ( HttpsURLConnection con ) throws IOException { StringBuilder response = new StringBuilder ( ) ; BufferedReader in = null ; try { con . setRequestMethod ( "GET" ) ; con . setRequestProperty ( "User-Agent" , USER_AGENT ) ; in = new BufferedReader ( new InputStreamReader ( con . getInputStream ( ) ) ) ; String inputLine ; while ( ( inputLine = in . readLine ( ) ) != null ) { response . append ( inputLine ) ; } } catch ( UnknownHostException uhe ) { throw new IOException ( "unknown host or no network" , uhe ) ; } catch ( Exception e ) { throw new IOException ( e ) ; } finally { if ( in != null ) { in . close ( ) ; } } return response . toString ( ) ; }
common functionality between download ( string url ) and download ( string url , string language )
