Utility methods that read a named header and convert
its value into an int
and a long
respectively.
public int getHeaderFieldInt(String name, int default)
public long getHeaderFieldDate(String name, long default)
The long
returned by getHeaderFieldDate()
can be converted into a Date
object
using a Date()
constructor like this:
String s = uc.getHeaderFieldDate("Last-modified", 0);
Date lm = new Date(s);