From an applet, how do I get information, like size and creation time, about a file on the server?

Brian O'Byrne

Assuming you have access to the file in question through a web server, you can use the URLConnection methods getContentLength() and getLastModified().

URL fileOfInterest = new URL(...);
URLConnection connectionToFileOfInterest =
int contentLength = 
long lastModifiedTime =
You cannot get the creation time this way.

Warning: this is not reliable across Web servers and you may end up downloading the file completely to get the size.