URL url=new URL(urlString); HttpURLConnection HttpURLConnection= (HttpURLConnection) url.openConnection(); HttpURLConnection.setRequestMethod("GET"); HttpURLConnection.setConnectTimeout(8000); InputStream inputStream = HttpURLConnection.getInputStream(); StringBuilder StringBuilder=new StringBuilder(); BufferedReader BufferedReader=new BufferedReader(new InputStreamReader(inputStream)); String temp=""; while ((temp=BufferedReader.readLine())!=null){ StringBuilder.append(temp); temp=""; } String s = StringBuilder.toString(); return s; } catch (Exception e) { e.printStackTrace(); } return "";
Adb
最新推荐文章于 2019-02-23 22:03:15 发布