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 ofRawValueDatafrom the given byte array.static <T> RawValueData<T>fromObject(T javaObject)Creates an instance ofRawValueDatafrom a Java object.byte[]toBytes(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)Converts thisRawValueDatainto a byte array.TtoObject(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)Converts thisRawValueDatainto a Java object.
-
-
-
Method Detail
-
toObject
T toObject(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
Converts thisRawValueDatainto 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(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
Converts thisRawValueDatainto 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 ofRawValueDatafrom a Java object.
-
fromBytes
static <T> RawValueData<T> fromBytes(byte[] bytes)
Creates an instance ofRawValueDatafrom the given byte array.
-
-