0
我試圖通過傳遞'#'字符與數字發起呼叫。但是,當我通過該URI發生異常,如下所示IllegalArgumentException異常發起呼叫傳遞#字符
01-21 10:36:21.247:WARN/System.err(383):java.lang.IllegalArgumentException:索引104處的碎片中的非法字符:
我的代碼是
public String getHttpConnectionToServer(String uri, String proxyIP,
Integer port, String debugMode) {
HttpGet httppost = new HttpGet(uri);
HttpResponse response = client.execute(httppost);
HttpEntity entity = response.getEntity();
InputStream is = entity.getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(
is, "iso-8859-1"), 8);
StringBuilder sb = new StringBuilder();
}
Exception is thrown at this line of code : HttpGet httppost = new HttpGet(uri);
我該如何解決?請幫助
你能顯示完整的URI嗎?我的意思是它看起來如何? – barmaley 2011-01-21 05:50:24