Package org.apache.james.mime4j.message
Class SingleBodyBuilder
- java.lang.Object
-
- org.apache.james.mime4j.message.SingleBodyBuilder
-
public class SingleBodyBuilder extends Object
Builder forTextBodyandBinaryBodyinstances.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleBodybuild()BinaryBodybuildBinary()TextBodybuildText()SingleBodyBuildercopy(SingleBody other)static SingleBodyBuildercreate()static SingleBodyBuildercreateCopy(SingleBody other)SingleBodyBuilderreadFrom(InputStream in)SingleBodyBuilderreadFrom(Reader in)SingleBodyBuildersetByteArray(byte[] bin)SingleBodyBuildersetCharset(Charset charset)SingleBodyBuildersetText(String text)SingleBodyBuilderuse(BodyFactory bodyFactory)
-
-
-
Method Detail
-
create
public static SingleBodyBuilder create()
-
createCopy
public static SingleBodyBuilder createCopy(SingleBody other) throws IOException
- Throws:
IOException
-
use
public SingleBodyBuilder use(BodyFactory bodyFactory)
-
setText
public SingleBodyBuilder setText(String text)
-
setByteArray
public SingleBodyBuilder setByteArray(byte[] bin)
-
setCharset
public SingleBodyBuilder setCharset(Charset charset)
-
readFrom
public SingleBodyBuilder readFrom(InputStream in) throws IOException
- Throws:
IOException
-
readFrom
public SingleBodyBuilder readFrom(Reader in) throws IOException
- Throws:
IOException
-
copy
public SingleBodyBuilder copy(SingleBody other) throws IOException
- Throws:
IOException
-
buildText
public TextBody buildText() throws IOException
- Throws:
IOException
-
buildBinary
public BinaryBody buildBinary() throws IOException
- Throws:
IOException
-
build
public SingleBody build() throws IOException
- Throws:
IOException
-
-