class UTF8Encoding
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private char[] |
decoderArray |
private static int |
MAX_CODE_POINT |
private static int |
MIN_2_BYTES |
private static int |
MIN_3_BYTES |
private static int |
MIN_4_BYTES |
| Constructor and Description |
|---|
UTF8Encoding() |
| Modifier and Type | Method and Description |
|---|---|
private static void |
checkByte(int ch,
int pos,
int len) |
private static void |
checkMinimal(int ch,
int minValue) |
java.lang.String |
decode(byte[] data,
int offset,
int length)
Custom byte[] -> String conversion routine for UTF-8 only.
|
private static final int MIN_2_BYTES
private static final int MIN_3_BYTES
private static final int MIN_4_BYTES
private static final int MAX_CODE_POINT
private char[] decoderArray
private static final void checkByte(int ch,
int pos,
int len)
throws java.io.IOException
java.io.IOExceptionprivate static final void checkMinimal(int ch,
int minValue)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String decode(byte[] data,
int offset,
int length)
throws java.io.IOException
data - the array containing UTF8-encoded dataoffset - the offset of the first byte in data to decode fromlength - the number of bytes to decodejava.io.IOException - if something goes wrong