java.lang.Object | |
↳ | org.apache.lucene.util.UnicodeUtil |
Class to encode java's UTF16 char[] into UTF8 byte[] without always allocating a new byte[] as String.getBytes("UTF-8") does.
WARNING: This API is a new and experimental and may suddenly change.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
UnicodeUtil.UTF16Result | |||||||||||
UnicodeUtil.UTF8Result |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | UNI_REPLACEMENT_CHAR | ||||||||||
int | UNI_SUR_HIGH_END | ||||||||||
int | UNI_SUR_HIGH_START | ||||||||||
int | UNI_SUR_LOW_END | ||||||||||
int | UNI_SUR_LOW_START |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Encode characters from this String, starting at offset
for length characters.
| |||||||||||
Encode characters from a char[] source, starting at
offset for length chars.
| |||||||||||
Encode characters from a char[] source, starting at
offset and stopping when the character 0xffff is seen.
| |||||||||||
Convert UTF8 bytes into UTF16 characters.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Encode characters from this String, starting at offset for length characters. Returns the number of bytes written to bytesOut.
Encode characters from a char[] source, starting at offset for length chars. Returns the number of bytes written to bytesOut.
Encode characters from a char[] source, starting at offset and stopping when the character 0xffff is seen. Returns the number of bytes written to bytesOut.
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.