org.apache.nutch.net.protocols

## Class HttpDateFormat

- java.lang.Object
- - org.apache.nutch.net.protocols.HttpDateFormat

-     public class HttpDateFormat
      extends java.lang.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 java.text.SimpleDateFormat` | `format`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpDateFormat()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] args)`
    `static java.util.Date` | `toDate(java.lang.String dateString)`
    `static long` | `toLong(java.lang.String dateString)`
    `static java.lang.String` | `toString(java.util.Calendar cal)`
    `static java.lang.String` | `toString(java.util.Date date)` Get the HTTP format of the specified date.
    `static java.lang.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 java.text.SimpleDateFormat format

  - ### Constructor Detail

    - #### HttpDateFormat

          public HttpDateFormat()

  - ### Method Detail

    - #### toString

          public static java.lang.String toString(java.util.Date date)

      Get the HTTP format of the specified date.

    - #### toString

          public static java.lang.String toString(java.util.Calendar cal)

    - #### toString

          public static java.lang.String toString(long time)

    - #### toDate

          public static java.util.Date toDate(java.lang.String dateString)
                                       throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### toLong

          public static long toLong(java.lang.String dateString)
                             throws java.text.ParseException

      Throws:
        `java.text.ParseException`

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2019 The Apache Software Foundation