Package org.apache.james.mime4j.stream
Class DefaultFieldBuilder
- java.lang.Object
-
- org.apache.james.mime4j.stream.DefaultFieldBuilder
-
- All Implemented Interfaces:
FieldBuilder
public class DefaultFieldBuilder extends Object implements FieldBuilder
Default implementation ofFieldBuilder.
-
-
Constructor Summary
Constructors Constructor Description DefaultFieldBuilder(int maxlen)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(ByteArrayBuffer line)Updates builder's internal state by adding a new line of text.RawFieldbuild()Builds an instance ofRawFieldbased on the internal state.ByteArrayBuffergetRaw()Returns combined content of all lines processed so far ornullif the builder does not retain original raw content.voidreset()Resets the internal state of the builder making it ready to process new input.
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:FieldBuilderResets the internal state of the builder making it ready to process new input.- Specified by:
resetin interfaceFieldBuilder
-
append
public void append(ByteArrayBuffer line) throws MaxHeaderLengthLimitException
Description copied from interface:FieldBuilderUpdates builder's internal state by adding a new line of text.- Specified by:
appendin interfaceFieldBuilder- Throws:
MaxHeaderLengthLimitException
-
build
public RawField build() throws MimeException
Description copied from interface:FieldBuilderBuilds an instance ofRawFieldbased on the internal state.- Specified by:
buildin interfaceFieldBuilder- Throws:
MimeException
-
getRaw
public ByteArrayBuffer getRaw()
Description copied from interface:FieldBuilderReturns combined content of all lines processed so far ornullif the builder does not retain original raw content.- Specified by:
getRawin interfaceFieldBuilder
-
-