Class StringUtf8Utils
- java.lang.Object
-
- org.apache.flink.table.runtime.util.StringUtf8Utils
-
public class StringUtf8Utils extends Object
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 Constructor Description StringUtf8Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
decodeUTF8(byte[] input, int offset, int byteLen)
static String
decodeUTF8(org.apache.flink.core.memory.MemorySegment input, int offset, int byteLen)
static int
decodeUTF8Strict(byte[] sa, int sp, int len, char[] da)
static int
decodeUTF8Strict(org.apache.flink.core.memory.MemorySegment segment, int sp, int len, char[] da)
static String
defaultDecodeUTF8(byte[] bytes, int offset, int len)
static int
defaultEncodeUTF8(String str, byte[] bytes)
static byte[]
encodeUTF8(String str)
This method must have the same result with JDK's String.getBytes.static int
encodeUTF8(String str, byte[] bytes)
-
-
-
Method Detail
-
encodeUTF8
public static byte[] encodeUTF8(String str)
This method must have the same result with JDK's String.getBytes.
-
encodeUTF8
public static int encodeUTF8(String str, byte[] bytes)
-
defaultEncodeUTF8
public static int defaultEncodeUTF8(String str, byte[] bytes)
-
decodeUTF8
public static String decodeUTF8(byte[] input, int offset, int byteLen)
-
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
public static String defaultDecodeUTF8(byte[] bytes, int offset, int len)
-
-