Package org.apache.flink.table.data
Interface StringData
- All Superinterfaces:
Comparable<StringData>
- All Known Implementing Classes:
BinaryStringData
An internal data structure representing data of
CharType and VarCharType.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringDatafromBytes(byte[] bytes) Creates an instance ofStringDatafrom the given UTF-8 byte array.static StringDatafromBytes(byte[] bytes, int offset, int numBytes) Creates an instance ofStringDatafrom the given UTF-8 byte array with offset and number of bytes.static StringDatafromString(String str) Creates an instance ofStringDatafrom the givenString.byte[]toBytes()Converts thisStringDataobject to a UTF-8 byte array.toString()Converts thisStringDataobject to aString.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
toBytes
byte[] toBytes()Converts thisStringDataobject to a UTF-8 byte array.Note: The returned byte array may be reused.
-
toString
String toString()Converts thisStringDataobject to aString. -
fromString
Creates an instance ofStringDatafrom the givenString. -
fromBytes
Creates an instance ofStringDatafrom the given UTF-8 byte array. -
fromBytes
Creates an instance ofStringDatafrom the given UTF-8 byte array with offset and number of bytes.
-