Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to get the document expiration date

Java: How to get the document expiration date

import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Date;
public class DateExpir
  public static void main(String args[]) throws Exception
    URL url = new URL("http://www.exemple.com");
    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    long date = conn.getExpiration();
    if (date > 0)
      System.out.println("Expires: " + new Date(date));

Users who found this page were searching for:

  • java printall interface
  • how to add file link in jpanal
  • java expiration date
  • program to calculate difference between two dates java
  • do-while loop even numbers
  • calendar.getinstance expiry Date.set in java example
  • java get document from url
  • java expiration date

No comments yet.

Leave a Comment