Class HttpDateTimeFormatter
- java.lang.Object
-
- org.apache.jackrabbit.webdav.util.HttpDateTimeFormatter
-
public class HttpDateTimeFormatter extends java.lang.ObjectParsers and Serializers for HTTP dates (RFC 7231, Section 7.1.1.1), usingDateTimeFormatter(from Java 8).
-
-
Constructor Summary
Constructors Constructor Description HttpDateTimeFormatter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringformat(long millisSinceEpoch)Format as HTTP default date (IMF-fixdate) (see RFC 7231, Section 7.1.1.1)static java.lang.StringformatAscTime(long millisSinceEpoch)Format as HTTP "asctime-date" (see RFC 7231, Section 7.1.1.1)static java.lang.StringformatImfFixed(long millisSinceEpoch)Format as HTTP "IMF-fixdate" (see RFC 7231, Section 7.1.1.1)static java.lang.StringformatRfc850(long millisSinceEpoch)Format as HTTP "rfc850-date" (see RFC 7231, Section 7.1.1.1)static longparse(java.lang.String fieldValue)Parse HTTP format, trying the three allowable formats defined in RFC 7231, Section 7.1.1.1static longparseAscTimeDate(java.lang.String fieldValue)Parse HTTP "asctime-date" format (see RFC 7231, Section 7.1.1.1)static longparseImfFixedDate(java.lang.String fieldValue)Parse HTTP "IMF-fixdate" format (see RFC 7231, Section 7.1.1.1)static longparseRfc850Date(java.lang.String fieldValue)Parse HTTP "rfc850-date" format (see RFC 7231, Section 7.1.1.1)
-
-
-
Method Detail
-
parseImfFixedDate
public static long parseImfFixedDate(java.lang.String fieldValue)
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
public static long parseRfc850Date(java.lang.String fieldValue)
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
public static long parseAscTimeDate(java.lang.String fieldValue)
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
public static long parse(java.lang.String fieldValue)
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
public static java.lang.String format(long millisSinceEpoch)
Format as HTTP default date (IMF-fixdate) (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
formatImfFixed
public static java.lang.String formatImfFixed(long millisSinceEpoch)
Format as HTTP "IMF-fixdate" (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
formatRfc850
public static java.lang.String formatRfc850(long millisSinceEpoch)
Format as HTTP "rfc850-date" (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
formatAscTime
public static java.lang.String formatAscTime(long millisSinceEpoch)
Format as HTTP "asctime-date" (see RFC 7231, Section 7.1.1.1)- Parameters:
millisSinceEpoch- ms since epoch- Returns:
- string representation
-
-