Class FastDatePrinter.Iso8601_Rule

    • Constructor Detail

      • Iso8601_Rule

        Iso8601_Rule​(int length)
        Constructs an instance of Iso8601_Rule with the specified properties.
        Parameters:
        length - The number of characters in output (unless Z is output)
    • Method Detail

      • getRule

        static FastDatePrinter.Iso8601_Rule getRule​(int tokenLen)
        Factory method for Iso8601_Rules.
        Parameters:
        tokenLen - a token indicating the length of the TimeZone String to be formatted.
        Returns:
        a Iso8601_Rule that can format TimeZone String of length tokenLen. If no such rule exists, an IllegalArgumentException will be thrown.
      • estimateLength

        public int estimateLength()
        Returns the estimated length of the result.
        Specified by:
        estimateLength in interface FastDatePrinter.Rule
        Returns:
        the estimated length
      • appendTo

        public void appendTo​(java.lang.Appendable buffer,
                             java.util.Calendar calendar)
                      throws java.io.IOException
        Appends the value of the specified calendar to the output buffer based on the rule implementation.
        Specified by:
        appendTo in interface FastDatePrinter.Rule
        Parameters:
        buffer - the output buffer
        calendar - calendar to be appended
        Throws:
        java.io.IOException - if an I/O error occurs.