Class ByteArrayBody

java.lang.Object
com.atlassian.oai.validator.model.ByteArrayBody
All Implemented Interfaces:
Body

public class ByteArrayBody extends Object implements Body
  • 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

      public String toString(Charset encoding)
      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