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
IOException
public 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
IOException
public SingleBodyBuilder readFrom(Reader in) throws IOException
IOException
public SingleBodyBuilder copy(SingleBody other) throws IOException
IOException
public TextBody buildText() throws IOException
IOException
public BinaryBody buildBinary() throws IOException
IOException
public SingleBody build() throws IOException
IOException
Copyright © 2004–2023 The Apache Software Foundation. All rights reserved.