URLConnection: getLastModified()
import java.net.URL;
import java.net.URLConnection;
public class Main {
public static void main(String[] argv) throws Exception {
URL u = new URL("http://127.0.0.1/test.gif");
URLConnection uc = u.openConnection();
uc.setUseCaches(false);
long timestamp = uc.getLastModified();
}
}
Home
Java Book
Networking
Java Book
Networking
URLConnection:
- URLConnection
- URLConnection: connect() throws IOException
- URLConnection: getContentEncoding()
- URLConnection: getExpiration()
- URLConnection: getHeaderFields()
- URLConnection: getHeaderField(int n)
- URLConnection: getHeaderFieldKey(int n)
- URLConnection: getIfModifiedSince()
- URLConnection: getLastModified()
- URLConnection: getURL()
- URLConnection: setAllowUserInteraction(boolean allowuserinteraction)
- URLConnection: setDoOutput(boolean dooutput)
- URLConnection: setIfModifiedSince(long ifmodifiedsince)
- URLConnection: setRequestProperty(String key, String value)
- URLConnection: setUseCaches(boolean usecaches)