Class HttpDate


  • public final class HttpDate
    extends java.lang.Object
    Best-effort parser for HTTP dates.

    Copied from OkHttp.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long MAX_DATE
      The last four-digit year: "Fri, 31 Dec 9999 23:59:59 GMT".
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String format​(java.util.Date value)
      Returns the string for value.
      static java.util.Date parse​(java.lang.String value)
      Returns the date for value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_DATE

        public static final long MAX_DATE
        The last four-digit year: "Fri, 31 Dec 9999 23:59:59 GMT".
        See Also:
        Constant Field Values
    • Method Detail

      • parse

        public static java.util.Date parse​(java.lang.String value)
        Returns the date for value. Returns null if the value couldn't be parsed.
      • format

        public static java.lang.String format​(java.util.Date value)
        Returns the string for value.