- Prev Class
- Next Class
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
Field Summary
Fields Modifier and Type Field and Description protected static SimpleDateFormat
format
Constructor Summary
Constructors Constructor and Description HttpDateFormat()
Method Summary
Methods Modifier and Type Method and Description static void
main(String[] args)
static Date
toDate(String dateString)
static long
toLong(String dateString)
static String
toString(Calendar cal)
static String
toString(Date date)
Get the HTTP format of the specified date.
static String
toString(long time)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
-
format
protected static SimpleDateFormat format
Constructor Detail
-
HttpDateFormat
public HttpDateFormat()
Method Detail
-
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:
- <code>ParseException</code>
-
toLong
public static long toLong(String dateString) throws ParseException
- Throws:
- <code>ParseException</code>
-
main
public static void main(String[] args) throws Exception
- Throws:
- <code>Exception</code>
- Prev Class
- Next Class