Package co.elastic.clients.util
Class BinaryData.ByteArrayBinaryData
java.lang.Object
co.elastic.clients.util.BinaryData.ByteArrayBinaryData
- All Implemented Interfaces:
BinaryData
- Enclosing interface:
- BinaryData
-
Nested Class Summary
Nested classes/interfaces inherited from interface co.elastic.clients.util.BinaryData
BinaryData.ByteArrayBinaryData
-
Method Summary
Modifier and TypeMethodDescriptionReturn this data as aByteBuffer
long
size()
Get the estimated size in bytes of the data.void
writeTo
(OutputStream out) Write this data to an output stream.
-
Method Details
-
writeTo
Description copied from interface:BinaryData
Write this data to an output stream.- Specified by:
writeTo
in interfaceBinaryData
- Throws:
IOException
-
size
public long size()Description copied from interface:BinaryData
Get the estimated size in bytes of the data.- Specified by:
size
in interfaceBinaryData
- Returns:
- the estimated size, or
-1
if the value cannot be estimated or if the data has already been consumed.
-
asByteBuffer
Description copied from interface:BinaryData
Return this data as aByteBuffer
- Specified by:
asByteBuffer
in interfaceBinaryData
-