private void processCharacter ( StringBuilder sb , char nextChar ) { if ( ( escapechar != NO_ESCAPE_CHARACTER ) && checkCharactersToEscape ( nextChar ) ) { sb . append ( escapechar ) . append ( nextChar ) ; } else { sb . append ( nextChar ) ; } }
Appends the character to the StringBuilder adding the escape character if needed .