protected void encodeAndWrite ( Encoder encoder , EncodingState newEncodingState , CharSequence input ) throws IOException { Object encoded = encoder . encode ( input ) ; if ( encoded != null ) { String encodedStr = String . valueOf ( encoded ) ; write ( newEncodingState , encodedStr , 0 , encodedStr . length ( ) ) ; } }
Encode and write input to buffer using a non - streaming encoder