public class SingleBodyBuilder extends Object
TextBody and BinaryBody instances.| Modifier and Type | Method and 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) |
public static SingleBodyBuilder create()
public static SingleBodyBuilder createCopy(SingleBody other) throws IOException
IOExceptionpublic SingleBodyBuilder use(BodyFactory bodyFactory)
public SingleBodyBuilder setText(String text)
public SingleBodyBuilder setByteArray(byte[] bin)
public SingleBodyBuilder setCharset(Charset charset)
public SingleBodyBuilder readFrom(InputStream in) throws IOException
IOExceptionpublic SingleBodyBuilder readFrom(Reader in) throws IOException
IOExceptionpublic SingleBodyBuilder copy(SingleBody other) throws IOException
IOExceptionpublic TextBody buildText() throws IOException
IOExceptionpublic BinaryBody buildBinary() throws IOException
IOExceptionpublic SingleBody build() throws IOException
IOExceptionCopyright © 2004–2023 The Apache Software Foundation. All rights reserved.