Package org.apache.james.mime4j.message
Class SingleBodyBuilder
- java.lang.Object
-
- org.apache.james.mime4j.message.SingleBodyBuilder
-
public class SingleBodyBuilder extends Object
Builder forTextBody
andBinaryBody
instances.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SingleBody
build()
BinaryBody
buildBinary()
TextBody
buildText()
SingleBodyBuilder
copy(SingleBody other)
static SingleBodyBuilder
create()
static SingleBodyBuilder
createCopy(SingleBody other)
SingleBodyBuilder
readFrom(InputStream in)
SingleBodyBuilder
readFrom(Reader in)
SingleBodyBuilder
setByteArray(byte[] bin)
SingleBodyBuilder
setCharset(Charset charset)
SingleBodyBuilder
setText(String text)
SingleBodyBuilder
use(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
-
-