Class BinaryData

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public class BinaryData extends HashMap<String,Object>

Reified representation of binary data chunk contained in a message.

BinaryData is composed of a metaData map that contains application information about the binary chunk (such as a file name, the mime type, or the chunk number), of the binary chunk itself (either in byte[] or ByteBuffer format), and of the boolean last flag indicating whether it is the last chunk.

See Also:
  • Field Details Link icon

  • Constructor Details Link icon

    • BinaryData Link icon

      public BinaryData(ByteBuffer byteBuffer, boolean last, Map<String,Object> metaData)
    • BinaryData Link icon

      public BinaryData(byte[] bytes, boolean last, Map<String,Object> metaData)
    • BinaryData Link icon

      public BinaryData(Map<? extends String, ?> map)
  • Method Details Link icon

    • asByteBuffer Link icon

      public ByteBuffer asByteBuffer()
      Returns:
      the binary chunk as ByteBuffer
    • asBytes Link icon

      public byte[] asBytes()
      Returns:
      the binary chunk as byte[]
    • isLast Link icon

      public boolean isLast()
      Returns:
      whether the binary chunk is the last
    • getMetaData Link icon

      public Map<String,Object> getMetaData()
      Returns:
      the meta data associated with the binary chunk