Class AcceptDatetime


  • public class AcceptDatetime
    extends Object
    A class representing an HTTP Accept-Datetime header.
    • Constructor Detail

      • AcceptDatetime

        public AcceptDatetime​(Instant datetime)
        Create an Accept-Datetime header object.
        Parameters:
        datetime - the date time in RFC 1123 format
    • Method Detail

      • getInstant

        public Instant getInstant()
        Retrieve the corresponding instant.
        Returns:
        the instant
      • valueOf

        public static AcceptDatetime valueOf​(String value)
        Create an Accept-Datetime header object from a string.
        Parameters:
        value - the header value
        Returns:
        an AcceptDatetime object or null if the value is not parseable