org.apache.james.mime4j.stream
Class DefaultFieldBuilder

java.lang.Object
  extended by org.apache.james.mime4j.stream.DefaultFieldBuilder
All Implemented Interfaces:
FieldBuilder

public class DefaultFieldBuilder
extends java.lang.Object
implements FieldBuilder

Default implementation of FieldBuilder.


Constructor Summary
DefaultFieldBuilder(int maxlen)
           
 
Method Summary
 void append(ByteArrayBuffer line)
          Updates builder's internal state by adding a new line of text.
 RawField build()
          Builds an instance of RawField based on the internal state.
 ByteArrayBuffer getRaw()
          Returns combined content of all lines processed so far or null if the builder does not retain original raw content.
 void reset()
          Resets the internal state of the builder making it ready to process new input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFieldBuilder

public DefaultFieldBuilder(int maxlen)
Method Detail

reset

public void reset()
Description copied from interface: FieldBuilder
Resets the internal state of the builder making it ready to process new input.

Specified by:
reset in interface FieldBuilder

append

public void append(ByteArrayBuffer line)
            throws MaxHeaderLengthLimitException
Description copied from interface: FieldBuilder
Updates builder's internal state by adding a new line of text.

Specified by:
append in interface FieldBuilder
Throws:
MaxHeaderLengthLimitException

build

public RawField build()
               throws MimeException
Description copied from interface: FieldBuilder
Builds an instance of RawField based on the internal state.

Specified by:
build in interface FieldBuilder
Throws:
MimeException

getRaw

public ByteArrayBuffer getRaw()
Description copied from interface: FieldBuilder
Returns combined content of all lines processed so far or null if the builder does not retain original raw content.

Specified by:
getRaw in interface FieldBuilder


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.