Package org.glassfish.tyrus.core
Class StrictUtf8.Parser
- java.lang.Object
-
- org.glassfish.tyrus.core.StrictUtf8.Parser
-
- Enclosing class:
- StrictUtf8
public static class StrictUtf8.Parser extends java.lang.ObjectSurrogate parsing support. Charset implementations may use instances of this class to handle the details of parsing UTF-16 surrogate pairs.
-
-
Constructor Summary
Constructors Constructor Description Parser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.charset.CoderResulterror()If the previous parse operation detected an error, return the object describing that error.intparse(char c, char[] ia, int ip, int il)Parses a UCS-4 character from the given source buffer, handling surrogates.intparse(char c, java.nio.CharBuffer in)Parses a UCS-4 character from the given source buffer, handling surrogates.
-
-
-
Method Detail
-
error
public java.nio.charset.CoderResult error()
If the previous parse operation detected an error, return the object describing that error.- Returns:
- object describing encountered parse error.
-
parse
public int parse(char c, java.nio.CharBuffer in)Parses a UCS-4 character from the given source buffer, handling surrogates.- Parameters:
c- The first characterin- The source buffer, from which one more character will be consumed if c is a high surrogate- Returns:
- Either a parsed UCS-4 character, in which case the isPair() and increment() methods will return meaningful values, or -1, in which case error() will return a descriptive result object
-
parse
public int parse(char c, char[] ia, int ip, int il)Parses a UCS-4 character from the given source buffer, handling surrogates.- Parameters:
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- Returns:
- Either a parsed UCS-4 character, in which case the isPair() and increment() methods will return meaningful values, or -1, in which case error() will return a descriptive result object
-
-