Results 1 to 1 of 1
-
Checking of file was modified on the server
Sometimes it is useful to ensure that whether the file was modified on the server or not. An example is presented below:
Java Code:URL u =null; long timestamp = 0; try { u = new URL(getDocumentBase(), "test.gif"); URLConnection uc = u.openConnection(); uc.setUseCaches(false); /* ** use timestamp has a reference, re-open an URLConnection ** to the same file to check if the timestamp is different ** with the getLastModified() method. */ timestamp = uc.getLastModified(); } catch (Exception e) { e.printStackTrace(); } }
Similar Threads
-
To transfer a file from client to server
By phani in forum NetworkingReplies: 4Last Post: 10-12-2010, 06:15 PM -
send file via client - server model
By spasavvas in forum NetworkingReplies: 15Last Post: 08-13-2010, 11:45 AM -
Modified Pixels
By monkey04 in forum Java 2DReplies: 1Last Post: 03-12-2009, 08:15 AM -
Copy a .swf file from server side to client using signed applet
By Imoracle in forum Java AppletsReplies: 2Last Post: 10-05-2008, 06:13 PM -
How to get the last modified date of a file from a java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:45 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks