Interface BinaryData

All Known Implementing Classes:
BinaryData.ByteArrayBinaryData

public interface BinaryData
Binary data representing a serialized value.
  • Method Details

    • writeTo

      void writeTo(OutputStream out) throws IOException
      Write this data to an output stream.
      Throws:
      IOException
    • asByteBuffer

      ByteBuffer asByteBuffer()
      Return this data as a ByteBuffer
    • size

      long size()
      Get the estimated size in bytes of the data.
      Returns:
      the estimated size, or -1 if the value cannot be estimated or if the data has already been consumed.
    • of

      static BinaryData of(Object value, JsonpMapper mapper)
      Create a BinaryData from a value and a JSON mapper. The binary content is the result of serializing value with mapper. Returns null if value is null.
    • of

      static BinaryData of(byte[] bytes)
    • of

      static BinaryData of(byte[] value, int offset, int length)