Package org.apache.james.mime4j.field
Class MimeVersionFieldImpl
- java.lang.Object
-
- org.apache.james.mime4j.field.AbstractField
-
- org.apache.james.mime4j.field.MimeVersionFieldImpl
-
- All Implemented Interfaces:
MimeVersionField
,ParsedField
,Field
public class MimeVersionFieldImpl extends AbstractField implements MimeVersionField
Represents aMIME-Version
field.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAJOR_VERSION
static int
DEFAULT_MINOR_VERSION
private int
major
private int
minor
private boolean
parsed
private ParseException
parsedException
static FieldParser<MimeVersionField>
PARSER
-
Fields inherited from class org.apache.james.mime4j.field.AbstractField
monitor, rawField
-
-
Constructor Summary
Constructors Constructor Description MimeVersionFieldImpl(Field rawField, DecodeMonitor monitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMajorVersion()
int
getMinorVersion()
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.MimeVersionField
bodyDescriptionField
-
Methods inherited from interface org.apache.james.mime4j.dom.field.ParsedField
isValidField
-
-
-
-
Field Detail
-
DEFAULT_MINOR_VERSION
public static final int DEFAULT_MINOR_VERSION
- See Also:
- Constant Field Values
-
DEFAULT_MAJOR_VERSION
public static final int DEFAULT_MAJOR_VERSION
- See Also:
- Constant Field Values
-
parsed
private boolean parsed
-
major
private int major
-
minor
private int minor
-
parsedException
private ParseException parsedException
-
PARSER
public static final FieldParser<MimeVersionField> PARSER
-
-
Constructor Detail
-
MimeVersionFieldImpl
MimeVersionFieldImpl(Field rawField, DecodeMonitor monitor)
-
-
Method Detail
-
parse
private void parse()
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfaceMimeVersionField
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfaceMimeVersionField
-
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()
-
-