org.apache.nutch.net.protocols
Class HttpDateFormat

java.lang.Object
  extended by 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
protected static SimpleDateFormat format
           
 
Constructor Summary
HttpDateFormat()
           
 
Method Summary
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 final 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:
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.