※ 引述《Madon (羽)》之銘言:
: 我用下面的code來讀取url網址回傳的資料:
: HttpClient httpclient = new DefaultHttpClient();
: HttpGet httpget = new HttpGet(url);
: HttpResponse response = httpclient.execute(httpget);
: HttpEntity entity = response.getEntity();
: return EntityUtils.toString(entity);
: 但是我把return的直LogCat出來,他其實沒有把整個網頁的文字都抓出來
: 但直接用電腦瀏覽器打開url的話可以看到完整的文字資訊
: 是不是用這個方法對url做GET會有回傳長度上的限制?
: 懇請高手賜教>"<
: 謝謝
嗯...logcat裡面是個ring buffer喔,有長度上的限制,
下 logcat -g 就知道多大了,
所以大概是你get回來的網頁大於這個buffer size了
--
Beware of bugs in the above code;
I have only proved it correct, not tried it.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.32.193.107