嗨,我有特定的 url(Given) 被调用并在浏览器中正确给出,但是当我在 android 中使用它时它不提供完整输出它只是提供部分输出
URL url = new URL("http://www.livedatatunnel.com/httpsymbolhelper/default.aspx");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
try {
InputStream in=urlConnection.getInputStream();
urlConnection.connect();
BufferedReader reader = new BufferedReader(new InputStreamReader(in),2500);
String result="", line="";
while((line=reader.readLine())!=null){
result+=line;
}
urlConnection.disconnect();
System.out.println(result);
return result;
}catch(Exception e){
e.printStackTrace();
return null;
}finally {
urlConnection.disconnect();
}
}
请帮忙...