List of utility methods to do UTF8 to String Convert
String | utf8BytesToString(byte[] bytes, int start, int length) Converts an array of UTF-8 bytes into a string. char[] chars = localBuffer.get(); if (chars == null || chars.length < length) { chars = new char[length]; localBuffer.set(chars); int outAt = 0; for (int at = start; length > 0; ) { int v0 = bytes[at] & 0xFF; ... |
String | utf8BytesWithUtf16LengthToString( @Nonnull byte[] bytes, int start, int utf16Length) Converts an array of UTF-8 bytes into a string. return utf8BytesWithUtf16LengthToString(bytes, start, utf16Length,
null);
|
String | utf8BytesWithUtf16LengthToString( @Nonnull byte[] bytes, int start, int utf16Length, @Nullable int[] readLength) Converts an array of UTF-8 bytes into a string. char[] chars = localBuffer.get(); if (chars == null || chars.length < utf16Length) { chars = new char[utf16Length]; localBuffer.set(chars); int outAt = 0; int at = 0; for (at = start; utf16Length > 0; utf16Length--) { ... |
String | utf8decoder(byte[] data, int offset, int length) utfdecoder try { return UTF8_DECODER.decode( ByteBuffer.wrap(data, offset, length)).toString(); } catch (CharacterCodingException ex) { throw new RuntimeException(ex); |