Package org.apache.james.mime4j.field
Class DateTimeFieldImpl
- java.lang.Object
-
- org.apache.james.mime4j.field.AbstractField
-
- org.apache.james.mime4j.field.DateTimeFieldImpl
-
- All Implemented Interfaces:
DateTimeField
,ParsedField
,Field
public class DateTimeFieldImpl extends AbstractField implements DateTimeField
Date-time field such asDate
orResent-Date
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Date
date
private boolean
parsed
private ParseException
parseException
static FieldParser<DateTimeField>
PARSER
-
Fields inherited from class org.apache.james.mime4j.field.AbstractField
monitor, rawField
-
-
Constructor Summary
Constructors Constructor Description DateTimeFieldImpl(Field rawField, DecodeMonitor monitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
getDate()
ParseException
getParseException()
Returns the exception that was thrown by the field parser while parsing the field value.private void
parse()
-
Methods inherited from class org.apache.james.mime4j.field.AbstractField
getBody, getName, getNameLowerCase, getRaw, getRawField, isValidField, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.james.mime4j.stream.Field
getBody, getName, getNameLowerCase, getRaw
-
Methods inherited from interface org.apache.james.mime4j.dom.field.ParsedField
bodyDescriptionField, isValidField
-
-
-
-
Field Detail
-
parsed
private boolean parsed
-
date
private java.util.Date date
-
parseException
private ParseException parseException
-
PARSER
public static final FieldParser<DateTimeField> PARSER
-
-
Constructor Detail
-
DateTimeFieldImpl
DateTimeFieldImpl(Field rawField, DecodeMonitor monitor)
-
-
Method Detail
-
getDate
public java.util.Date getDate()
- Specified by:
getDate
in interfaceDateTimeField
- See Also:
DateTimeField.getDate()
-
getParseException
public ParseException getParseException()
Description copied from interface:ParsedField
Returns the exception that was thrown by the field parser while parsing the field value. The result isnull
if the field is valid and no errors were encountered.- Specified by:
getParseException
in interfaceParsedField
- Overrides:
getParseException
in classAbstractField
- Returns:
- the exception that was thrown by the field parser or
null
if the field is valid. - See Also:
ParsedField.getParseException()
-
parse
private void parse()
-
-