Package org.apache.flink.table.data
Interface RawValueData<T>
-
- Type Parameters:
T
- originating class for the raw value
- All Known Implementing Classes:
BinaryRawValueData
@PublicEvolving public interface RawValueData<T>
An internal data structure representing data ofRawType
.This data structure is immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T> RawValueData<T>
fromBytes(byte[] bytes)
Creates an instance ofRawValueData
from the given byte array.static <T> RawValueData<T>
fromObject(T javaObject)
Creates an instance ofRawValueData
from a Java object.byte[]
toBytes(TypeSerializer<T> serializer)
Converts thisRawValueData
into a byte array.T
toObject(TypeSerializer<T> serializer)
Converts thisRawValueData
into a Java object.
-
-
-
Method Detail
-
toObject
T toObject(TypeSerializer<T> serializer)
Converts thisRawValueData
into a Java object.The given serializer is required because the "raw value" might be represented in a binary format and needs to be deserialized first.
Note: The returned Java object may be reused.
-
toBytes
byte[] toBytes(TypeSerializer<T> serializer)
Converts thisRawValueData
into a byte array.The given serializer is required because the "raw value" might be still be a Java object and needs to be serialized first.
Note: The returned byte array may be reused.
-
fromObject
static <T> RawValueData<T> fromObject(T javaObject)
Creates an instance ofRawValueData
from a Java object.
-
fromBytes
static <T> RawValueData<T> fromBytes(byte[] bytes)
Creates an instance ofRawValueData
from the given byte array.
-
-