Class HttpDateTimeFormatter
java.lang.Object
org.apache.jackrabbit.webdav.util.HttpDateTimeFormatter
Parsers and Serializers for HTTP dates (RFC 7231, Section 7.1.1.1), using
DateTimeFormatter (from Java 8).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringformat(long millisSinceEpoch) Format as HTTP default date (IMF-fixdate) (see RFC 7231, Section 7.1.1.1)static StringformatAscTime(long millisSinceEpoch) Format as HTTP "asctime-date" (see RFC 7231, Section 7.1.1.1)static StringformatImfFixed(long millisSinceEpoch) Format as HTTP "IMF-fixdate" (see RFC 7231, Section 7.1.1.1)static StringformatRfc850(long millisSinceEpoch) Format as HTTP "rfc850-date" (see RFC 7231, Section 7.1.1.1)static longParse HTTP format, trying the three allowable formats defined in RFC 7231, Section 7.1.1.1static longparseAscTimeDate(String fieldValue) Parse HTTP "asctime-date" format (see RFC 7231, Section 7.1.1.1)static longparseImfFixedDate(String fieldValue) Parse HTTP "IMF-fixdate" format (see RFC 7231, Section 7.1.1.1)static longparseRfc850Date(String fieldValue) Parse HTTP "rfc850-date" format (see RFC 7231, Section 7.1.1.1)
-
Constructor Details
-
HttpDateTimeFormatter
public HttpDateTimeFormatter()
-
-
Method Details
-
parseImfFixedDate
Parse HTTP "IMF-fixdate" format (see RFC 7231, Section 7.1.1.1)- Parameters:
fieldValue- string value- Returns:
- ms since epoch throws DateTimeParseException on invalid input
-
parseRfc850Date
Parse HTTP "rfc850-date" format (see RFC 7231, Section 7.1.1.1)- Parameters:
fieldValue- string value- Returns:
- ms since epoch throws DateTimeParseException on invalid input
-
parseAscTimeDate
Parse HTTP "asctime-date" format (see RFC 7231, Section 7.1.1.1)- Parameters:
fieldValue- string value- Returns:
- ms since epoch throws DateTimeParseException on invalid input
-
parse
Parse HTTP format, trying the three allowable formats defined in RFC 7231, Section 7.1.1.1- Parameters:
fieldValue- string value- Returns:
- ms since epoch throws DateTimeParseException on invalid input
-
format
Format as HTTP default date (IMF-fixdate) (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
formatImfFixed
Format as HTTP "IMF-fixdate" (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
formatRfc850
Format as HTTP "rfc850-date" (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
formatAscTime
Format as HTTP "asctime-date" (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-