Class SimpleBody
java.lang.Object
org.apache.hc.client5.http.async.methods.SimpleBody
Message body representation as a simple text string or an array of bytes.
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private final Stringprivate final org.apache.hc.core5.http.ContentType -
Constructor Summary
ConstructorsConstructorDescriptionSimpleBody(byte[] bodyAsBytes, String bodyAsText, org.apache.hc.core5.http.ContentType contentType) -
Method Summary
Modifier and TypeMethodDescription(package private) static SimpleBodycreate(byte[] body, org.apache.hc.core5.http.ContentType contentType) (package private) static SimpleBodybyte[]org.apache.hc.core5.http.ContentTypebooleanisBytes()booleanisText()toString()
-
Field Details
-
bodyAsBytes
private final byte[] bodyAsBytes -
bodyAsText
-
contentType
private final org.apache.hc.core5.http.ContentType contentType
-
-
Constructor Details
-
SimpleBody
SimpleBody(byte[] bodyAsBytes, String bodyAsText, org.apache.hc.core5.http.ContentType contentType)
-
-
Method Details
-
create
-
create
-
getContentType
public org.apache.hc.core5.http.ContentType getContentType() -
getBodyBytes
public byte[] getBodyBytes() -
getBodyText
-
isText
public boolean isText() -
isBytes
public boolean isBytes() -
toString
-