Module jakarta.mail

Class MailDateFormat.AbstractDateParser

java.lang.Object
jakarta.mail.internet.MailDateFormat.AbstractDateParser
Direct Known Subclasses:
MailDateFormat.Rfc2822StrictParser
Enclosing class:
MailDateFormat

private abstract static class MailDateFormat.AbstractDateParser extends Object
This class provides the building blocks for date parsing.

It has the following invariants:

  • no exceptions are thrown, except for java.text.ParseException from parse* methods
  • when parse* throws ParseException OR get* returns INVALID_CHAR OR skip* returns false OR peek* is invoked, then pos.getIndex() on method exit is the same as it was on method entry
  • Field Details

  • Constructor Details

  • Method Details

    • parse

      final Date parse()
    • tryParse

      abstract Date tryParse() throws ParseException
      Throws:
      ParseException
    • parseDayName

      final int parseDayName() throws ParseException
      Returns:
      the java.util.Calendar constant for the parsed day name
      Throws:
      ParseException
    • parseMonthName

      final int parseMonthName(boolean caseSensitive) throws ParseException
      Returns:
      the java.util.Calendar constant for the parsed month name
      Throws:
      ParseException
    • parseZoneOffset

      final int parseZoneOffset() throws ParseException
      Returns:
      the number of minutes to be added to the time in the local time zone, in order to obtain the equivalent time in the UTC time zone. Returns 0 if the date-time contains no information about the local time zone.
      Throws:
      ParseException
    • isValidZoneOffset

      boolean isValidZoneOffset(int offset)
    • parseAsciiDigits

      final int parseAsciiDigits(int count) throws ParseException
      Throws:
      ParseException
    • parseAsciiDigits

      final int parseAsciiDigits(int min, int max) throws ParseException
      Throws:
      ParseException
    • parseAsciiDigits

      final int parseAsciiDigits(int min, int max, boolean isEOF) throws ParseException
      Throws:
      ParseException
    • parseFoldingWhiteSpace

      final void parseFoldingWhiteSpace() throws ParseException
      Throws:
      ParseException
    • parseChar

      final void parseChar(char ch) throws ParseException
      Throws:
      ParseException
    • getAsciiDigit

      final int getAsciiDigit()
    • getChar

      final int getChar()
    • skipFoldingWhiteSpace

      boolean skipFoldingWhiteSpace()
    • skipWhiteSpace

      final boolean skipWhiteSpace()
    • skipNewline

      final boolean skipNewline()
    • skipAlternativeTriple

      final boolean skipAlternativeTriple(char firstStandard, char firstAlternative, char secondStandard, char secondAlternative, char thirdStandard, char thirdAlternative)
    • skipAlternativePair

      final boolean skipAlternativePair(char firstStandard, char firstAlternative, char secondStandard, char secondAlternative)
    • skipAlternative

      final boolean skipAlternative(char standard, char alternative)
    • skipPair

      final boolean skipPair(char first, char second)
    • skipChar

      final boolean skipChar(char ch)
    • peekAsciiDigit

      final boolean peekAsciiDigit()
    • peekFoldingWhiteSpace

      boolean peekFoldingWhiteSpace()
    • peekChar

      final boolean peekChar(char ch)