private static class FastDatePrinter.Iso8601_Rule extends java.lang.Object implements FastDatePrinter.Rule
Inner class to output a time zone as a number +/-HHMM
or +/-HH:MM.
| Modifier and Type | Field and Description |
|---|---|
(package private) static FastDatePrinter.Iso8601_Rule |
ISO8601_HOURS |
(package private) static FastDatePrinter.Iso8601_Rule |
ISO8601_HOURS_COLON_MINUTES |
(package private) static FastDatePrinter.Iso8601_Rule |
ISO8601_HOURS_MINUTES |
(package private) int |
length |
| Constructor and Description |
|---|
Iso8601_Rule(int length)
Constructs an instance of
Iso8601_Rule with the specified properties. |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(java.lang.Appendable buffer,
java.util.Calendar calendar)
Appends the value of the specified calendar to the output buffer based on the rule implementation.
|
int |
estimateLength()
Returns the estimated length of the result.
|
(package private) static FastDatePrinter.Iso8601_Rule |
getRule(int tokenLen)
Factory method for Iso8601_Rules.
|
static final FastDatePrinter.Iso8601_Rule ISO8601_HOURS
static final FastDatePrinter.Iso8601_Rule ISO8601_HOURS_MINUTES
static final FastDatePrinter.Iso8601_Rule ISO8601_HOURS_COLON_MINUTES
final int length
Iso8601_Rule(int length)
Iso8601_Rule with the specified properties.length - The number of characters in output (unless Z is output)static FastDatePrinter.Iso8601_Rule getRule(int tokenLen)
tokenLen - a token indicating the length of the TimeZone String to be formatted.tokenLen. If no such
rule exists, an IllegalArgumentException will be thrown.public int estimateLength()
estimateLength in interface FastDatePrinter.Rulepublic void appendTo(java.lang.Appendable buffer,
java.util.Calendar calendar)
throws java.io.IOException
appendTo in interface FastDatePrinter.Rulebuffer - the output buffercalendar - calendar to be appendedjava.io.IOException - if an I/O error occurs