Parser

class Parser

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

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun character(): Int

Returns the UCS-4 character previously parsed.

Link copied to clipboard

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

Link copied to clipboard
fun increment(): Int

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

Link copied to clipboard

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

Link copied to clipboard
fun parse(c: Char, in: CharBuffer): Int
fun parse(c: Char, ia: CharArray, ip: Int, il: Int): Int

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

Link copied to clipboard

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