public static class Surrogate.Parser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
character |
private java.nio.charset.CoderResult |
error |
private boolean |
isPair |
Constructor and Description |
---|
Parser() |
Modifier and Type | Method and Description |
---|---|
int |
character()
Returns the UCS-4 character previously parsed.
|
java.nio.charset.CoderResult |
error()
If the previous parse operation detected an error, return the object
describing that error.
|
int |
increment()
Returns the number of UTF-16 characters consumed by the previous
parse.
|
boolean |
isPair()
Tells whether or not the previously-parsed UCS-4 character was
originally represented by a surrogate pair.
|
int |
parse(char c,
char[] ia,
int ip,
int il)
Parses a UCS-4 character from the given source buffer, handling
surrogates.
|
int |
parse(char c,
java.nio.CharBuffer in)
Parses a UCS-4 character from the given source buffer, handling
surrogates.
|
java.nio.charset.CoderResult |
unmappableResult()
Returns an unmappable-input result object, with the appropriate
input length, for the previously-parsed character.
|
private int character
private java.nio.charset.CoderResult error
private boolean isPair
public int character()
public boolean isPair()
public int increment()
public java.nio.charset.CoderResult error()
public java.nio.charset.CoderResult unmappableResult()
public int parse(char c, java.nio.CharBuffer in)
c
- The first characterin
- The source buffer, from which one more character
will be consumed if c is a high surrogatepublic int parse(char c, char[] ia, int ip, int il)
c
- The first characteria
- The input array, from which one more character
will be consumed if c is a high surrogateip
- The input indexil
- The input limit