This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Each month we check a number of zip files saved to an Intranet to see if they've been updated, which (usually) happens quarterly, sometimes more often.
To practice my coding skills I thought I'd write a small app which holds a list of URLs, and tests each of them to see if the file at the URL is 'newer' that the previous check performed. Currently I'm using a URLConnection object and was hoping to use its getLastModified() to determine if the file has been updated since the previous check.
I've come to test my code on various files on the Internet and is seems not all files have a value returned from getLastModified().
Is there a better way to query files in this way to see of they've been updated, or am I dependant on whether this information is present on a file by file basis?