public final class UTF8CharacterSet extends java.lang.Object implements CharacterSet
Modifier and Type | Method and Description |
---|---|
static int |
decodeUTF8(byte[] in,
int used)
Decode a UTF8 character
|
java.lang.String |
getCanonicalName()
Get the preferred Java name of the character set.
|
static UTF8CharacterSet |
getInstance()
Get the singular instance of this class
|
static int |
getUTF8Encoding(char in,
char in2,
byte[] out)
Static method to generate the UTF-8 representation of a Unicode character
|
boolean |
inCharset(int c)
Determine if a character is present in the character set
|
public static UTF8CharacterSet getInstance()
public boolean inCharset(int c)
CharacterSet
inCharset
in interface CharacterSet
public java.lang.String getCanonicalName()
CharacterSet
getCanonicalName
in interface CharacterSet
public static int getUTF8Encoding(char in, char in2, byte[] out)
in
- the Unicode character, or the high half of a surrogate pairin2
- the low half of a surrogate pair (ignored unless the first argument is in the
range for a surrogate pair)out
- an array of at least 4 bytes to hold the UTF-8 representation.public static int decodeUTF8(byte[] in, int used) throws java.lang.IllegalArgumentException
in
- array of bytes representing a single UTF-8 encoded characterused
- number of bytes in the array that are actually usedjava.lang.IllegalArgumentException
- if the byte sequence is not a valid UTF-8 representationCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.