public final class DecoderUtils
extends java.lang.Object
Constructor and Description |
---|
DecoderUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
decodeDateTime(java.lang.CharSequence chars)
Decodes the given string as a standard IMAP date-time.
|
static int |
decodeDigit(char character)
Decodes a number character into a
0-9 digit. |
static int |
decodeFixedDay(char dayHigh,
char dayLow) |
static int |
decodeMonth(char monthFirstChar,
char monthSecondChar,
char monthThirdChar)
Decodes an IMAP
date-month to a Calendar month. |
static int |
decodeNumber(char high,
char low) |
static int |
decodeYear(char milleniumChar,
char centuryChar,
char decadeChar,
char yearChar)
Decodes a year.
|
static int |
decodeZone(char zoneDeterminent,
char zoneDigitOne,
char zoneDigitTwo,
char zoneDigitThree,
char zoneDigitFour) |
static boolean |
isSimpleDigit(char character)
Is the given character an ASCII digit.
|
public static java.util.Date decodeDateTime(java.lang.CharSequence chars) throws DecodingException
chars
- standard IMAP date-timeDate
with time component, not nullDecodingException
- when this conversion failspublic static int decodeNumber(char high, char low) throws DecodingException
DecodingException
public static int decodeZone(char zoneDeterminent, char zoneDigitOne, char zoneDigitTwo, char zoneDigitThree, char zoneDigitFour) throws DecodingException
DecodingException
public static boolean isSimpleDigit(char character)
character
- characterpublic static int decodeYear(char milleniumChar, char centuryChar, char decadeChar, char yearChar) throws DecodingException
milleniumChar
- first digitcenturyChar
- second digitdecadeChar
- third digityearChar
- forth digitCalendar
yearDecodingException
public static int decodeMonth(char monthFirstChar, char monthSecondChar, char monthThirdChar) throws DecodingException
date-month
to a Calendar
month.monthFirstChar
- first character in a month triplemonthSecondChar
- second character in a month triplemonthThirdChar
- third character in a month tripleCalendar
month (JAN
=0)DecodingException
public static int decodeFixedDay(char dayHigh, char dayLow) throws DecodingException
DecodingException
public static int decodeDigit(char character) throws DecodingException
0-9
digit.character
- DecodingException
- if the char is not a digitCopyright © 2021. All Rights Reserved.