public static String readStringFromUrlGeneric(String url) throws IOException {
  InputStream is=null;
  URL urlObj=null;
  String responseString=PcConstants.NA;
  try {
    urlObj=new URL(url);
    URLConnection con=urlObj.openConnection();
    con.setConnectTimeout(ParallecGlobalConfig.urlConnectionConnectTimeoutMillis);
    con.setReadTimeout(ParallecGlobalConfig.urlConnectionReadTimeoutMillis);
    is=con.getInputStream();
    BufferedReader rd=new BufferedReader(new InputStreamReader(is,Charset.forName("UTF-8")));
    responseString=PcFileNetworkIoUtils.readAll(rd);
  }
  finally {
    if (is != null) {
      is.close();
    }
  }
  return responseString;
}

public static String readStringFromUrlGeneric ( String url ) throws IOException { InputStream is = null ; URL urlObj = null ; String responseString = PcConstants . NA ; try { urlObj = new URL ( url ) ; URLConnection con = urlObj . openConnection ( ) ; con . setConnectTimeout ( ParallecGlobalConfig . urlConnectionConnectTimeoutMillis ) ; con . setReadTimeout ( ParallecGlobalConfig . urlConnectionReadTimeoutMillis ) ; is = con . getInputStream ( ) ; BufferedReader rd = new BufferedReader ( new InputStreamReader ( is , Charset . forName ( "UTF-8" ) ) ) ; responseString = PcFileNetworkIoUtils . readAll ( rd ) ; } finally { if ( is != null ) { is . close ( ) ; } } return responseString ; }
read string from url generic .
