@ GwtIncompatible ( "incompatible method" ) public final String translate ( final CharSequence input ) { if ( input == null ) { return null ; } try { final StringWriter writer = new StringWriter ( input . length ( ) * 2 ) ; translate ( input , writer ) ; return writer . toString ( ) ; } catch ( final IOException ioe ) { // this should never ever happen while writing to a StringWriter throw new RuntimeException ( ioe ) ; } }
Helper for non - Writer usage .