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