private final int _convertSurrogate ( int secondPart ) throws IOException { int firstPart = mSurrogate ; mSurrogate = 0 ; // Ok, then, is the second part valid? 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 .