org.elasticsearch.common
Class Unicode
java.lang.Object
org.elasticsearch.common.Unicode
public class Unicode
- extends Object
Method Summary |
static String |
fromBytes(byte[] source)
|
static String |
fromBytes(byte[] source,
int offset,
int length)
|
static Unicode.UTF16Result |
fromBytesAsUtf16(byte[] source)
|
static Unicode.UTF16Result |
fromBytesAsUtf16(byte[] source,
int offset,
int length)
|
static byte[] |
fromStringAsBytes(String source)
|
static org.apache.lucene.util.UnicodeUtil.UTF8Result |
fromStringAsUtf8(String source)
|
static void |
fromStringAsUtf8(String source,
org.apache.lucene.util.UnicodeUtil.UTF8Result result)
|
static Unicode.UTF16Result |
unsafeFromBytesAsUtf16(byte[] source)
|
static Unicode.UTF16Result |
unsafeFromBytesAsUtf16(byte[] source,
int offset,
int length)
|
static org.apache.lucene.util.UnicodeUtil.UTF8Result |
unsafeFromStringAsUtf8(String source)
|
static void |
UTF8toUTF16(byte[] utf8,
int offset,
int length,
Unicode.UTF16Result result)
Convert UTF8 bytes into UTF16 characters. |
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(String source)
fromStringAsUtf8
public static org.apache.lucene.util.UnicodeUtil.UTF8Result fromStringAsUtf8(String source)
fromStringAsUtf8
public static void fromStringAsUtf8(String source,
org.apache.lucene.util.UnicodeUtil.UTF8Result result)
unsafeFromStringAsUtf8
public static org.apache.lucene.util.UnicodeUtil.UTF8Result unsafeFromStringAsUtf8(String source)
fromBytes
public static String fromBytes(byte[] source)
fromBytes
public static 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.
Copyright © 2009-2012. All Rights Reserved.