|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.mime4j.field.DelegatingFieldParser
org.apache.james.mime4j.field.LenientFieldParser
public class LenientFieldParser
Lenient implementation of the FieldParser
interface with a high degree of tolerance
to non-severe MIME field format violations.
Constructor Summary | |
---|---|
LenientFieldParser()
|
Method Summary | |
---|---|
static FieldParser<ParsedField> |
getParser()
Gets the default instance of this class. |
static ParsedField |
parse(ByteSequence raw,
DecodeMonitor monitor)
Parses the given byte sequence and returns an instance of the ParsedField class. |
static ParsedField |
parse(java.lang.String rawStr)
Parses the given string and returns an instance of the ParsedField class. |
static ParsedField |
parse(java.lang.String rawStr,
DecodeMonitor monitor)
Parses the given string and returns an instance of the Field class. |
Methods inherited from class org.apache.james.mime4j.field.DelegatingFieldParser |
---|
getParser, parse, setFieldParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LenientFieldParser()
Method Detail |
---|
public static FieldParser<ParsedField> getParser()
public static ParsedField parse(ByteSequence raw, DecodeMonitor monitor) throws MimeException
ParsedField
class.
The type of the class returned depends on the field name; see parse(String)
for
a table of field names and their corresponding classes.
raw
- the bytes to parse.monitor
- decoding monitor used while parsing/decoding.
MimeException
- if the raw string cannot be split into field name and body.public static ParsedField parse(java.lang.String rawStr, DecodeMonitor monitor) throws MimeException
Field
class.
The type of the class returned depends on the field name.
rawStr
- the string to parse.monitor
- a DecodeMonitor object used while parsing/decoding.
ParsedField
instance.
MimeException
- if the raw string cannot be split into field name and body.public static ParsedField parse(java.lang.String rawStr) throws MimeException
ParsedField
class.
The type of the class returned depends on the field name:
Class returned | Field names |
---|---|
ContentTypeField | Content-Type |
ContentLengthField | Content-Length |
ContentTransferEncodingField | Content-Transfer-Encoding |
ContentDispositionField | Content-Disposition |
ContentDescriptionField | Content-Description |
ContentIdField | Content-ID |
ContentMD5Field | Content-MD5 |
ContentLanguageField | Content-Language |
ContentLocationField | Content-Location |
MimeVersionField | MIME-Version |
DateTimeField | Date, Resent-Date |
MailboxField | Sender, Resent-Sender |
MailboxListField | From, Resent-From |
AddressListField | To, Cc, Bcc, Reply-To, Resent-To, Resent-Cc, Resent-Bcc |
UnstructuredField | Subject and others |
rawStr
- the string to parse.
MimeException
- if the raw string cannot be split into field name and body.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |