Class HttpDateGenerator

java.lang.Object
org.apache.hc.core5.http.protocol.HttpDateGenerator

@Contract(threading=SAFE) public class HttpDateGenerator extends Object
Generates a date in the format required by the HTTP protocol.
Since:
4.0
  • Field Details

    • GRANULARITY_MILLIS

      private static final int GRANULARITY_MILLIS
      See Also:
    • PATTERN_RFC1123

      public static final String PATTERN_RFC1123
      Date format pattern used to generate the header in RFC 1123 format.
      See Also:
    • GMT

      @Deprecated public static final TimeZone GMT
      Deprecated.
      This attribute is no longer supported as a part of the public API. The time zone to use in the date header.
    • GMT_ID

      public static final ZoneId GMT_ID
    • INSTANCE

      public static final HttpDateGenerator INSTANCE
      Singleton instance.
    • dateTimeFormatter

      private final DateTimeFormatter dateTimeFormatter
    • dateAsMillis

      private long dateAsMillis
    • dateAsText

      private String dateAsText
    • zoneId

      private ZoneId zoneId
  • Constructor Details

    • HttpDateGenerator

      HttpDateGenerator()
    • HttpDateGenerator

      private HttpDateGenerator(String pattern, ZoneId zoneId)
  • Method Details

    • getCurrentDate

      public String getCurrentDate()