Class BinaryData
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
-
Constructor Summary
ConstructorDescriptionBinaryData
(byte[] bytes, boolean last, Map<String, Object> metaData) BinaryData
(ByteBuffer byteBuffer, boolean last, Map<String, Object> metaData) BinaryData
(Map<? extends String, ?> map) -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
EXT_NAME
- See Also:
-
META
- See Also:
-
DATA
- See Also:
-
LAST
- See Also:
-
-
Constructor Details
-
BinaryData
-
BinaryData
-
BinaryData
-
-
Method Details
-
asByteBuffer
- Returns:
- the binary chunk as
ByteBuffer
-
asBytes
public byte[] asBytes()- Returns:
- the binary chunk as
byte[]
-
isLast
public boolean isLast()- Returns:
- whether the binary chunk is the last
-
getMetaData
-