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.

@param input CharSequence to be translated
@return String output of translation
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/ext/parser/utils/xml/CharSequenceTranslator.java