|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Comparing timestamp
I have an applet which downloads reads a file from server & displays. The applet gets refreshed after every 2 min, & if there isany change in the file it should display the new file. I am using URLConnection & it supports getLastModified() function. But how do i compare the timestamp of the same file.
Thanks |
|
#2
|
|||
|
|||
|
Code:
long oldTime = null;
long newTime = null;
newTime = daUrl.getLastModified()
if ( oldTime != newTime ) {
oldTime = newTime;
... reload file ...
}
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Comparing timestamp |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|