Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rabbit.http
Class HTTPDateParser

    java.lang.Object
      rabbit.http.HTTPDateParser

    public class HTTPDateParser

extends java.lang.Object

A utility class that parses date in the HTTP headers. A date in HTTP may be written in many different formats so try them all.

Constructor Summary
`HTTPDateParser()` The default constructor.

Method Summary
`static java.util.Date` | `getDate(java.lang.String date)` Try to get a date from the given string.
`static java.lang.String` | `getDateString(java.util.Date d)` Get a String from the date.
`static void` | `main(java.lang.String[] args)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HTTPDateParser

    public HTTPDateParser()

  The default constructor.

Method Detail

### getDate

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

  Try to get a date from the given string. According to RFC 2068 We have to read 3 formats.

  Parameters:
    `date` - the String we are trying to parse.
  Returns:
    a Date or null if parsing was not possible.

### getDateString

    public static java.lang.String getDateString(java.util.Date d)

  Get a String from the date.

  Parameters:
    `d` - the Date to format.
  Returns:
    a String describing the date in the right way.

### main

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD