org.elasticsearch.common
Class Unicode
java.lang.Object
org.elasticsearch.common.Unicode
public class Unicode
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Unicode
public Unicode()
fromStringAsBytes
public static byte[] fromStringAsBytes(java.lang.String source)
fromStringAsUtf8
public static org.apache.lucene.util.UnicodeUtil.UTF8Result fromStringAsUtf8(java.lang.String source)
unsafeFromStringAsUtf8
public static org.apache.lucene.util.UnicodeUtil.UTF8Result unsafeFromStringAsUtf8(java.lang.String source)
fromBytes
public static java.lang.String fromBytes(byte[] source)
fromBytes
public static java.lang.String fromBytes(byte[] source,
int offset,
int length)
fromBytesAsUtf16
public static Unicode.UTF16Result fromBytesAsUtf16(byte[] source)
fromBytesAsUtf16
public static Unicode.UTF16Result fromBytesAsUtf16(byte[] source,
int offset,
int length)
unsafeFromBytesAsUtf16
public static Unicode.UTF16Result unsafeFromBytesAsUtf16(byte[] source)
unsafeFromBytesAsUtf16
public static Unicode.UTF16Result unsafeFromBytesAsUtf16(byte[] source,
int offset,
int length)
UTF8toUTF16
public static void UTF8toUTF16(byte[] utf8,
int offset,
int length,
Unicode.UTF16Result result)
- Convert UTF8 bytes into UTF16 characters. If offset
is non-zero, conversion starts at that starting point
in utf8, re-using the results from the previous call
up until offset.