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.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static String |
DATA |
static String |
EXT_NAME |
static String |
LAST |
static String |
META |
Constructor and Description |
---|
BinaryData(byte[] bytes,
boolean last,
Map<String,Object> metaData) |
BinaryData(ByteBuffer byteBuffer,
boolean last,
Map<String,Object> metaData) |
BinaryData(Map<? extends String,?> map) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
asByteBuffer() |
byte[] |
asBytes() |
Map<String,Object> |
getMetaData() |
boolean |
isLast() |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
public static final String EXT_NAME
public static final String META
public static final String DATA
public static final String LAST
public BinaryData(ByteBuffer byteBuffer, boolean last, Map<String,Object> metaData)
public ByteBuffer asByteBuffer()
ByteBuffer
public byte[] asBytes()
byte[]
public boolean isLast()
Copyright © 2008–2024 The CometD Project. All rights reserved.