R
Roedy Green
I am polishing a snapshot webcam viewer. I am trying to detect if the
image the server sent me is the exact same one it sent before (or if I
am getting a cached version, against my wishes. )
In the DOS days, this would be straight forward. I would compute a
checksum of the bits and compare them, also comparing
URLConnection.getLastModified dates and images sizes in the header
(jpg files grow and shrink slightly due to compression when they
change even when the frame size does not change.
But in Java I am puzzled.
the URLConnection getLastModified just gives 0. Any hints on methods
to use or techniques to try? Ideally I would like to use a single
connection where I detect if I am reloading too frequently because the
image is not changing.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
image the server sent me is the exact same one it sent before (or if I
am getting a cached version, against my wishes. )
In the DOS days, this would be straight forward. I would compute a
checksum of the bits and compare them, also comparing
URLConnection.getLastModified dates and images sizes in the header
(jpg files grow and shrink slightly due to compression when they
change even when the frame size does not change.
But in Java I am puzzled.
the URLConnection getLastModified just gives 0. Any hints on methods
to use or techniques to try? Ideally I would like to use a single
connection where I detect if I am reloading too frequently because the
image is not changing.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes