我正在使用 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
如何仅检索主机地址。我尝试使用数组不会发生一些错误。请帮助我获取主机地址