- All Implemented Interfaces:
Body
public class ByteArrayBody
extends Object
implements Body
-
Constructor Summary
Constructors
-
Method Summary
boolean
com.fasterxml.jackson.databind.JsonNode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ByteArrayBody
public ByteArrayBody(@Nonnull
byte[] content)
-
Method Details
-
hasBody
public boolean hasBody()
- Specified by:
hasBody in interface Body
- Returns:
true if the bodies content contains at least one sign, otherwise false
-
toJsonNode
public com.fasterxml.jackson.databind.JsonNode toJsonNode()
throws
IOException
- Specified by:
toJsonNode in interface Body
- Returns:
- the bodies content as
JsonNode
- Throws:
IOException - in case the transformation fails
-
toString
- Specified by:
toString in interface Body
- Parameters:
encoding - the Charset the bodies content shall be converted to
- Returns:
- the bodies content as
String converted with the specified encoding