Class DateTimeParser
- java.lang.Object
-
- org.apache.james.mime4j.field.datetime.parser.DateTimeParser
-
- All Implemented Interfaces:
DateTimeParserConstants
public class DateTimeParser extends java.lang.Object implements DateTimeParserConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
DateTimeParser.Date
private static class
DateTimeParser.Time
-
Field Summary
Fields Modifier and Type Field Description private static boolean
ignoreMilitaryZoneOffset
private java.util.List<int[]>
jj_expentries
private int[]
jj_expentry
private int
jj_gen
(package private) SimpleCharStream
jj_input_stream
private int
jj_kind
private int[]
jj_la1
private static int[]
jj_la1_0
private static int[]
jj_la1_1
Token
jj_nt
Next token.private int
jj_ntk
Token
token
Current token.DateTimeParserTokenManager
token_source
Generated Token Manager.private boolean
trace_enabled
-
Fields inherited from interface org.apache.james.mime4j.field.datetime.parser.DateTimeParserConstants
ANY, APR, AUG, COMMENT, DEC, DEFAULT, DIGITS, EOF, FEB, FRI, INCOMMENT, JAN, JUL, JUN, MAR, MAY, MILITARY_ZONE, MON, NESTED_COMMENT, NOV, OCT, OFFSETDIR, QUOTEDPAIR, SAT, SEP, SUN, THU, tokenImage, TUE, WED, WS
-
-
Constructor Summary
Constructors Constructor Description DateTimeParser(java.io.InputStream stream)
Constructor with InputStream.DateTimeParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingDateTimeParser(java.io.Reader stream)
Constructor.DateTimeParser(DateTimeParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DateTimeParser.Date
date()
DateTime
date_time()
int
day()
java.lang.String
day_of_week()
void
disable_tracing()
Disable tracing.private DateTime
doParseAll()
private DateTime
doParseLine()
void
enable_tracing()
Enable tracing.ParseException
generateParseException()
Generate ParseException.private static int
getMilitaryZoneOffset(char c)
Token
getNextToken()
Get the next Token.Token
getToken(int index)
Get the specific Token.int
hour()
private Token
jj_consume_token(int kind)
private static void
jj_la1_init_0()
private static void
jj_la1_init_1()
private int
jj_ntk_f()
static void
main(java.lang.String[] args)
int
minute()
int
month()
int
obs_zone()
DateTime
parseAll()
private static int
parseDigits(Token token)
DateTime
parseLine()
void
ReInit(java.io.InputStream stream)
Reinitialise.void
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.void
ReInit(java.io.Reader stream)
Reinitialise.void
ReInit(DateTimeParserTokenManager tm)
Reinitialise.int
second()
DateTimeParser.Time
time()
boolean
trace_enabled()
Trace enabled.java.lang.String
year()
int
zone()
-
-
-
Field Detail
-
ignoreMilitaryZoneOffset
private static final boolean ignoreMilitaryZoneOffset
- See Also:
- Constant Field Values
-
token_source
public DateTimeParserTokenManager token_source
Generated Token Manager.
-
jj_input_stream
SimpleCharStream jj_input_stream
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
jj_ntk
private int jj_ntk
-
jj_gen
private int jj_gen
-
jj_la1
private final int[] jj_la1
-
jj_la1_0
private static int[] jj_la1_0
-
jj_la1_1
private static int[] jj_la1_1
-
jj_expentries
private java.util.List<int[]> jj_expentries
-
jj_expentry
private int[] jj_expentry
-
jj_kind
private int jj_kind
-
trace_enabled
private boolean trace_enabled
-
-
Constructor Detail
-
DateTimeParser
public DateTimeParser(java.io.InputStream stream)
Constructor with InputStream.
-
DateTimeParser
public DateTimeParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
DateTimeParser
public DateTimeParser(java.io.Reader stream)
Constructor.
-
DateTimeParser
public DateTimeParser(DateTimeParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws ParseException
- Throws:
ParseException
-
parseAll
public DateTime parseAll() throws ParseException
- Throws:
ParseException
-
parseLine
public DateTime parseLine() throws ParseException
- Throws:
ParseException
-
parseDigits
private static int parseDigits(Token token)
-
getMilitaryZoneOffset
private static int getMilitaryZoneOffset(char c)
-
doParseLine
private final DateTime doParseLine() throws ParseException
- Throws:
ParseException
-
doParseAll
private final DateTime doParseAll() throws ParseException
- Throws:
ParseException
-
date_time
public final DateTime date_time() throws ParseException
- Throws:
ParseException
-
day_of_week
public final java.lang.String day_of_week() throws ParseException
- Throws:
ParseException
-
date
public final DateTimeParser.Date date() throws ParseException
- Throws:
ParseException
-
day
public final int day() throws ParseException
- Throws:
ParseException
-
month
public final int month() throws ParseException
- Throws:
ParseException
-
year
public final java.lang.String year() throws ParseException
- Throws:
ParseException
-
time
public final DateTimeParser.Time time() throws ParseException
- Throws:
ParseException
-
hour
public final int hour() throws ParseException
- Throws:
ParseException
-
minute
public final int minute() throws ParseException
- Throws:
ParseException
-
second
public final int second() throws ParseException
- Throws:
ParseException
-
zone
public final int zone() throws ParseException
- Throws:
ParseException
-
obs_zone
public final int obs_zone() throws ParseException
- Throws:
ParseException
-
jj_la1_init_0
private static void jj_la1_init_0()
-
jj_la1_init_1
private static void jj_la1_init_1()
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.Reader stream)
Reinitialise.
-
ReInit
public void ReInit(DateTimeParserTokenManager tm)
Reinitialise.
-
jj_consume_token
private Token jj_consume_token(int kind) throws ParseException
- Throws:
ParseException
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
jj_ntk_f
private int jj_ntk_f()
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-