private int convertSurrogate(int secondPart) throws IOException {
  int firstPart=mSurrogate;
  mSurrogate=0;
  if (secondPart < SURR2_FIRST || secondPart > SURR2_LAST) {
    throw new IOException("Broken surrogate pair: first char 0x" + Integer.toHexString(firstPart) + ", second 0x"+ Integer.toHexString(secondPart)+ "; illegal combination");
  }
  return 0x10000 + ((firstPart - SURR1_FIRST) << 10) + (secondPart - SURR2_FIRST);
}

private int convertSurrogate ( int secondPart ) throws IOException { int firstPart = mSurrogate ; mSurrogate = 0 ; if ( secondPart < SURR2_FIRST || secondPart > SURR2_LAST ) { throw new IOException ( "Broken surrogate pair: first char 0x" + Integer . toHexString ( firstPart ) + ", second 0x" + Integer . toHexString ( secondPart ) + "; illegal combination" ) ; } return 0x10000 + ( ( firstPart - SURR1_FIRST ) << 10 ) + ( secondPart - SURR2_FIRST ) ; }
method called to calculate utf codepoint , from a surrogate pair .
