0

嗨,我有特定的 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();
    }
}

请帮忙...

4

1 回答 1

0

您应该提供连接超时和/或读取超时

于 2013-09-25T11:48:14.207 回答