代碼 大概是這樣 ,采集其他網(wǎng)頁沒有問題?
?
................
?????????????client.executeMethod(get);
????????????//
????????????String statusText = get.getStatusText();
????????????//System.out.println("Test.main():--->" + statusText);
????????????System.out.println("Test.main():--->" + new String(get.getResponseBodyAsString().getBytes("GB2312"), "UTF-8"));
????????????InputStream in = get.getResponseBodyAsStream();
????????????BufferedReader br = new BufferedReader(new InputStreamReader(in, charset));
????????????String tempbf;
????????????html = new StringBuffer(100);
???? ????? ........................
5 回答

ABOUTYOU
TA貢獻(xiàn)1812條經(jīng)驗(yàn) 獲得超5個(gè)贊
謝謝,其實(shí)是網(wǎng)頁使用的GZIP壓縮,使用GZIPInputSteam接收就可以了
添加回答
舉報(bào)
0/150
提交
取消