"Returns the value of the last-modified header field. The result is the number of milliseconds since January 1, 1970 GMT."
So we get a long which accurately tells us the date (pretty ok-ish if you use .toHexString()). However, that new Date() thingy (and it's toString()) produces a date which is somewhat difficult to compare. Eg I get it in "CEST" - my local timezone.
Something like this would be better:
DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.SHORT,Locale.ENGLISH);
The locale was explictly set in order to get identical formatting.
Now I get:
Jul 11, 2004 10:56 PM
Mon Jul 12 00:56:48 CEST 2004 (and everyone would get something else here)
getLastModified() with toHexString and toUpperCase looks like this:
FDB06C3780 (also ok and comparable)
Anyways... great idea