org.apache.nutch.net.protocols
Class HttpDateFormat
java.lang.Object
org.apache.nutch.net.protocols.HttpDateFormat
public class HttpDateFormat
- extends Object
class to handle HTTP dates.
Modified from FastHttpDateFormat.java in jakarta-tomcat.
- Author:
- John Xing
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
format
protected static final SimpleDateFormat format
HttpDateFormat
public HttpDateFormat()
toString
public static String toString(Date date)
- Get the HTTP format of the specified date.
toString
public static String toString(Calendar cal)
toString
public static String toString(long time)
toDate
public static Date toDate(String dateString)
throws ParseException
- Throws:
ParseException
toLong
public static long toLong(String dateString)
throws ParseException
- Throws:
ParseException
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2007, 2012, Oracle and/or its affiliates. All rights reserved.