Top Description Fields Constructors Methods
org.apache.hc.core5.http.protocol

public Class HttpDateGenerator

extends Object
Class Inheritance
Annotations
@Contract
threading:SAFE
Imports
java.time.Instant, .ZoneId, java.time.format.DateTimeFormatter, .DateTimeFormatterBuilder, java.util.TimeZone, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior

Generates a date in the format required by the HTTP protocol.
Since
4.0

Field Summary

Modifier and TypeField and Description
private long
private String
private final DateTimeFormatter
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.
public static final ZoneId
private static final int
public static final HttpDateGenerator
INSTANCE

Singleton instance.

public static final String
PATTERN_RFC1123

Date format pattern used to generate the header in RFC 1123 format.

private ZoneId

Constructor Summary

AccessConstructor and Description
pack-priv
private
HttpDateGenerator(final String pattern, final ZoneId zoneId)

Method Summary

Modifier and TypeMethod and Description
public synchronized String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dateAsMillisback to summary
private long dateAsMillis
dateAsTextback to summary
private String dateAsText
dateTimeFormatterback to summary
private final DateTimeFormatter dateTimeFormatter
GMTback to summary
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.

Annotations
@Deprecated
GMT_IDback to summary
public static final ZoneId GMT_ID
GRANULARITY_MILLISback to summary
private static final int GRANULARITY_MILLIS
INSTANCEback to summary
public static final HttpDateGenerator INSTANCE

Singleton instance.

PATTERN_RFC1123back to summary
public static final String PATTERN_RFC1123

Date format pattern used to generate the header in RFC 1123 format.

zoneIdback to summary
private ZoneId zoneId

Constructor Detail

HttpDateGeneratorback to summary
pack-priv HttpDateGenerator()
HttpDateGeneratorback to summary
private HttpDateGenerator(final String pattern, final ZoneId zoneId)

Method Detail

getCurrentDateback to summary
public synchronized String getCurrentDate()