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
{filelink=9050}

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:

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

No comments yet.

Leave a Comment