public class HttpTextBodyContent
Represents the body content of a HTTP message (request/response) that obtains content from a String.
| Constructor and description |
|---|
HttpTextBodyContent
(String text)Concretes an instance with the given text, default charset UTF-8, and default contentType
text/plain. |
HttpTextBodyContent
(String text, String charset)Concretes an instance with the given text, charset, and default contentType
text/plain |
HttpTextBodyContent
(String text, String charset, String contentType)Concretes an instance with the given text, charset, and charset. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public String |
getCharset() |
|
public String |
getContentEncoding() |
|
public long |
getContentLength() |
|
public String |
getContentType() |
|
public InputStream |
getInputStream() |
|
public String |
getText() |
|
public void |
writeTo(OutputStream outstream) |
Concretes an instance with the given text, default charset UTF-8, and default contentType
text/plain.
text - The raw content as plain text. Concretes an instance with the given text, charset, and default contentType
text/plain
text - The raw content as plain text.charset - the character set to be used. In case charset is null or empty, the default charset
UTF-8 is used. Concretes an instance with the given text, charset, and charset.
text - The raw content as plain text.charset - the character set to be used. In case charset is null or empty, the default
charset
UTF-8 is used.contentType - the content type to be used. In case contentType is null or empty, the default
contentType
text/plain is used.