private boolean extraEntity ( String outputString , int charToMap ) { boolean extra = false ; if ( charToMap < ASCII_MAX ) { switch ( charToMap ) { case ' ' : // quot if ( ! outputString . equals ( "&quot;" ) ) extra = true ; break ; case ' ' : // amp if ( ! outputString . equals ( "&amp;" ) ) extra = true ; break ; case ' ' : // lt if ( ! outputString . equals ( "&lt;" ) ) extra = true ; break ; case ' ' : // gt if ( ! outputString . equals ( "&gt;" ) ) extra = true ; break ; default : // other entity in range 0 to 127 extra = true ; } } return extra ; }
This method returns true if there are some non - standard mappings to entities other than quot amp lt gt and its only purpose is for performance .