Interface StringData

All Superinterfaces:
Comparable<StringData>
All Known Implementing Classes:
BinaryStringData

@PublicEvolving public interface StringData extends Comparable<StringData>
An internal data structure representing data of CharType and VarCharType.
  • Method Details

    • toBytes

      byte[] toBytes()
      Converts this StringData object to a UTF-8 byte array.

      Note: The returned byte array may be reused.

    • toString

      String toString()
      Converts this StringData object to a String.
      Overrides:
      toString in class Object
    • fromString

      static StringData fromString(String str)
      Creates an instance of StringData from the given String.
    • fromBytes

      static StringData fromBytes(byte[] bytes)
      Creates an instance of StringData from the given UTF-8 byte array.
    • fromBytes

      static StringData fromBytes(byte[] bytes, int offset, int numBytes)
      Creates an instance of StringData from the given UTF-8 byte array with offset and number of bytes.