question: private void writeEsc ( char ch [ ] , int start , int length , boolean isAttVal ) throws SAXException { for ( int i = start ; i < start + length ; i ++ ) { switch ( ch [ i ] ) { case '&' : write ( "&amp;" ) ; break ; case '<' : write ( "&lt;" ) ; break ; case '>' : write ( "&gt;" ) ; break ; case '\"' : if ( isAttVal ) { write ( "&quot;" ) ; } else { write ( '\"' ) ; } break ; default : if ( ! unicodeMode && ch [ i ] > '' ) { write ( "&#" ) ; write ( Integer . toString ( ch [ i ] ) ) ; write ( ';' ) ; } else { write ( ch [ i ] ) ; } } } }
target:  Write an array of data characters with escaping.