question: public static String convertCharEntity ( String charEntity , boolean lookupHTMLentities , Hashtable userDefinedCharEntities ) { int charCode = - 1 ; if ( charEntity . startsWith ( "#" ) ) { if ( charEntity . startsWith ( "#x" ) ) { try { charCode = Integer . parseInt ( charEntity . substring ( 2 ) , 16 ) ; } catch ( NumberFormatException nfe ) { } } else { try { charCode = Integer . parseInt ( charEntity . substring ( 1 ) ) ; } catch ( NumberFormatException nfe ) { } } } else { charCode = getCharEntityCode ( charEntity , lookupHTMLentities , userDefinedCharEntities ) ; } if ( charCode != - 1 ) { return "" + ( char ) charCode ; } else { throw new IllegalArgumentException ( "Unknown character entity - " + charEntity ) ; } }
target:  Converts a char entity to the matching character or string. This handles both numbered and symbol char entities (The latter is done via getCharEntityCode)