public static class

Surrogate.Parser

extends Object
java.lang.Object
   ↳ sun.nio.cs.Surrogate.Parser

Class Overview

Surrogate parsing support. Charset implementations may use instances of this class to handle the details of parsing UTF-16 surrogate pairs.

Summary

Public Constructors
Surrogate.Parser()
Public Methods
int character()
Returns the UCS-4 character previously parsed.
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, CharBuffer in)
Parses a UCS-4 character from the given source buffer, handling surrogates.
int parse(char c, char[] ia, int ip, int il)
Parses a UCS-4 character from the given source buffer, handling surrogates.
CoderResult unmappableResult()
Returns an unmappable-input result object, with the appropriate input length, for the previously-parsed character.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Surrogate.Parser ()

Public Methods

public int character ()

Returns the UCS-4 character previously parsed.

public CoderResult error ()

If the previous parse operation detected an error, return the object describing that error.

public int increment ()

Returns the number of UTF-16 characters consumed by the previous parse.

public boolean isPair ()

Tells whether or not the previously-parsed UCS-4 character was originally represented by a surrogate pair.

public int parse (char c, CharBuffer in)

Parses a UCS-4 character from the given source buffer, handling surrogates.

Parameters
c The first character
in The source buffer, from which one more character will be consumed if c is a high surrogate

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 character
ia The input array, from which one more character will be consumed if c is a high surrogate
ip The input index
il The input limit

public CoderResult unmappableResult ()

Returns an unmappable-input result object, with the appropriate input length, for the previously-parsed character.