如何在 Java 中获取网络资源的修改日期?
URL url = new URL(urlString);
URLConnection connection = url.openConnection();
connection.connect();
// What now?
最佳答案
URL url = new URL(urlString);
URLConnection connection = url.openConnection();
connection.connect();
long time = connection.getLastModified();
Returns the value of the last-modified header field. The result is the number of milliseconds since January 1, 1970 GMT.
关于java - 在Java中获取网络资源的修改日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3095775/