Storing downloaded files in Java
I have a java application that I am developing that displays pictures from the website it is made to supplement. Now I would like to save some bandwidth, so what I have done is made a created a 开发者_JAVA百科php script that md5 hashes the images and then my java captures the output and then compares it against hashes stored using the preferences api. What I would now like is for the images to be stored on the computer, Windows or Mac, and be there for when I run the program again. I've looked around for stuff on caching, but can't seem to find anything relevant to what I am doing. If I can't find anything I will just write my own for it, but a premade api would be great. Thanks
Any static content do carry expiration headers[ a.k.a E-Tags ] . While fetching the image from remote repository it might also be possible to fetch expiration headers accordingly.
Example Header : Expires: Thu, 15 Apr 2010 20:00:00 GMT
Thus they could save, much effort in re-verifying the meta-data of image file.
精彩评论