Class StringUtf8Utils
java.lang.Object
org.apache.flink.table.runtime.util.StringUtf8Utils
String utf-8 utils.
StringUtf8Utils refers to the implementation from SerializeWriter and IOUtils of
Alibaba fastjson. The difference is that StringUtf8Utils need to handle the wrong code, just like
StringCoding.decode.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdecodeUTF8(byte[] input, int offset, int byteLen) static StringdecodeUTF8(org.apache.flink.core.memory.MemorySegment input, int offset, int byteLen) static intdecodeUTF8Strict(byte[] sa, int sp, int len, char[] da) static intdecodeUTF8Strict(org.apache.flink.core.memory.MemorySegment segment, int sp, int len, char[] da) static StringdefaultDecodeUTF8(byte[] bytes, int offset, int len) static intdefaultEncodeUTF8(String str, byte[] bytes) static byte[]encodeUTF8(String str) This method must have the same result with JDK's String.getBytes.static intencodeUTF8(String str, byte[] bytes)
-
Constructor Details
-
StringUtf8Utils
public StringUtf8Utils()
-
-
Method Details
-
encodeUTF8
This method must have the same result with JDK's String.getBytes. -
encodeUTF8
-
defaultEncodeUTF8
-
decodeUTF8
-
decodeUTF8Strict
public static int decodeUTF8Strict(byte[] sa, int sp, int len, char[] da) -
decodeUTF8
public static String decodeUTF8(org.apache.flink.core.memory.MemorySegment input, int offset, int byteLen) -
decodeUTF8Strict
public static int decodeUTF8Strict(org.apache.flink.core.memory.MemorySegment segment, int sp, int len, char[] da) -
defaultDecodeUTF8
-