我已經在標題對象中獲得了標題值。但我需要將「Last-Modified」放入字符串對象中進行比較。請你能告訴我應該如何將最後一個標題放入字符串中。如何從標題獲取最後修改日期字符串
HttpClient client = new DefaultHttpClient();
//HttpGet get = new HttpGet(url);
HttpHead method = new HttpHead(url);
HttpResponse response = client.execute(method);
Header[] s = response.getAllHeaders();
String sh = String.valueOf(s);
System.out.println("The value of sh:"+sh);
System.out.println("The header from the httpclient:");
for (int i = 0; i < s.length; i++) {
Header hd = s[i];
System.out.println("Header Name: "+hd.getName() + " " + " Header Value: " + hd.getValue());
}
String last-modified = // here I need to convert this header(last-modified);