org.glassfish.grizzly.websockets
Class StrictUtf8.Parser

java.lang.Object
  extended by org.glassfish.grizzly.websockets.StrictUtf8.Parser
Enclosing class:
StrictUtf8

public static class StrictUtf8.Parser
extends Object

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


Constructor Summary
StrictUtf8.Parser()
           
 
Method Summary
 CoderResult error()
          If the previous parse operation detected an error, return the object describing that error.
 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, CharBuffer in)
          Parses a UCS-4 character from the given source buffer, handling surrogates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrictUtf8.Parser

public StrictUtf8.Parser()
Method Detail

error

public CoderResult error()
If the previous parse operation detected an error, return the object describing that error.


parse

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

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 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


Copyright © 2012 Oracle Corporation. All Rights Reserved.