我使用BufferedReader.readLine()方法來讀我是使用下面的代碼從遠程服務器套接字:BufferedReader類的readLine()
String com;
while ((com = bufferedReader.readLine()) == null)
{
System.out.println(com+"\n");
}
的響應,並且我得到這樣
GET http://bioactress.blogspot.in/ HTTP/1.1
Host: bioactress.blogspot.in
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/
14.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
If-Modified-Since: Sat, 17 Nov 2012 07:43:35 GMT
If-None-Match: "7f9584f0-06ba-448e-97a4-2b8bcd0b30b1"
Cache-Control: max-age=0
輸出
如何檢索主機地址只有.i是陣列嘗試不會發生一些錯誤。請幫助我任何一個獲得主機地址