Class BinaryRawValueData<T>

    • Constructor Detail

      • BinaryRawValueData

        public BinaryRawValueData​(T javaObject)
      • BinaryRawValueData

        public BinaryRawValueData​(org.apache.flink.core.memory.MemorySegment[] segments,
                                  int offset,
                                  int sizeInBytes)
      • BinaryRawValueData

        public BinaryRawValueData​(org.apache.flink.core.memory.MemorySegment[] segments,
                                  int offset,
                                  int sizeInBytes,
                                  T javaObject)
    • Method Detail

      • toObject

        public T toObject​(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
        Description copied from interface: RawValueData
        Converts this RawValueData 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.

        Specified by:
        toObject in interface RawValueData<T>
      • toBytes

        public byte[] toBytes​(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
        Description copied from interface: RawValueData
        Converts this RawValueData 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.

        Specified by:
        toBytes in interface RawValueData<T>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • materialize

        protected BinarySection materialize​(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
        Description copied from class: LazyBinaryFormat
        Materialize java object to binary format. Inherited classes need to hold the information they need. (For example, RawValueData needs javaObjectSerializer).
        Specified by:
        materialize in class LazyBinaryFormat<T>
      • fromBytes

        public static <T> BinaryRawValueData<T> fromBytes​(byte[] bytes,
                                                          int offset,
                                                          int numBytes)
        Creates a BinaryStringData instance from the given bytes with offset and number of bytes.