public int parse(char c,char[] ia,int ip,int il){
  assert (ia[ip] == c);
  if (Character.isHighSurrogate(c)) {
    if (il - ip < 2) {
      error=CoderResult.UNDERFLOW;
      return -1;
    }
    char d=ia[ip + 1];
    if (Character.isLowSurrogate(d)) {
      character=Character.toCodePoint(c,d);
      isPair=true;
      error=null;
      return character;
    }
    error=CoderResult.malformedForLength(1);
    return -1;
  }
  if (Character.isLowSurrogate(c)) {
    error=CoderResult.malformedForLength(1);
    return -1;
  }
  character=c;
  isPair=false;
  error=null;
  return character;
}

public int parse ( char c , char [ ] ia , int ip , int il ) { assert ( ia [ ip ] == c ) ; if ( Character . isHighSurrogate ( c ) ) { if ( il - ip < 2 ) { error = CoderResult . UNDERFLOW ; return - 1 ; } char d = ia [ ip + 1 ] ; if ( Character . isLowSurrogate ( d ) ) { character = Character . toCodePoint ( c , d ) ; isPair = true ; error = null ; return character ; } error = CoderResult . malformedForLength ( 1 ) ; return - 1 ; } if ( Character . isLowSurrogate ( c ) ) { error = CoderResult . malformedForLength ( 1 ) ; return - 1 ; } character = c ; isPair = false ; error = null ; return character ; }
parses a ucs - 4 character from the given source buffer , handling surrogates .
