question: public static String toHex ( byte [ ] val , int start , int len ) { StringBuilder buf = new StringBuilder ( ) ; for ( int i = 0 ; i < len ; i ++ ) { byte b = val [ start + i ] ; buf . append ( DEC2HEX [ ( b & 0xf0 ) > > 4 ] ) ; buf . append ( DEC2HEX [ b & 0x0f ] ) ; } return buf . toString ( ) ; }
target:  Can be used to encode values that contain invalid XML characters. At SAX parser end must be used pair method to get original value.