Package org.apache.james.mime4j.stream
Class RawField
- java.lang.Object
-
- org.apache.james.mime4j.stream.RawField
-
- All Implemented Interfaces:
Field
public final class RawField extends java.lang.Object implements Field
Raw (unstructured) MIME field. The field's body is unparsed and possibly encoded.
Instances of this class can be created by using
RawFieldParser.parseField(ByteSequence)method.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringbodyprivate intdelimiterIdxprivate java.lang.Stringnameprivate java.lang.StringnameLowerCaseprivate ByteSequenceraw
-
Constructor Summary
Constructors Constructor Description RawField(java.lang.String name, java.lang.String body)RawField(ByteSequence raw, int delimiterIdx, java.lang.String name, java.lang.String body)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBody()Gets the unparsed and possibly encoded (see RFC 2047) field body string.intgetDelimiterIdx()java.lang.StringgetName()Returns the name of the field.java.lang.StringgetNameLowerCase()Returns the name of the field in lower case.ByteSequencegetRaw()Gets original (raw) representation of the field, if available,nullotherwise.private static booleanisSpace(java.lang.String body, int pos)java.lang.StringtoString()
-
-
-
Field Detail
-
raw
private final ByteSequence raw
-
delimiterIdx
private final int delimiterIdx
-
name
private final java.lang.String name
-
body
private final java.lang.String body
-
nameLowerCase
private java.lang.String nameLowerCase
-
-
Constructor Detail
-
RawField
RawField(ByteSequence raw, int delimiterIdx, java.lang.String name, java.lang.String body)
-
RawField
public RawField(java.lang.String name, java.lang.String body)
-
-
Method Detail
-
isSpace
private static boolean isSpace(java.lang.String body, int pos)
-
getRaw
public ByteSequence getRaw()
Description copied from interface:FieldGets original (raw) representation of the field, if available,nullotherwise.
-
getName
public java.lang.String getName()
Description copied from interface:FieldReturns the name of the field.
-
getNameLowerCase
public java.lang.String getNameLowerCase()
Description copied from interface:FieldReturns the name of the field in lower case.- Specified by:
getNameLowerCasein interfaceField
-
getBody
public java.lang.String getBody()
Description copied from interface:FieldGets the unparsed and possibly encoded (see RFC 2047) field body string.
-
getDelimiterIdx
public int getDelimiterIdx()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-