/** * Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. * <p> * This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes * {@link #doEncoding(byte [])} method of a concrete class to perform the specific encoding. * * @param text * a string to encode * @param charsetName * the charset to use * @return RFC 1522 compliant "encoded-word" * @throws EncoderException * thrown if there is an error condition during the Encoding process. * @throws UnsupportedEncodingException * if charset is not available * * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a> */ protected String encodeText(final String text, final String charsetName) throws EncoderException, UnsupportedEncodingException { if (text == null) { return null; } return this.encodeText(text, Charset.forName(charsetName)); }
/** * Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. * <p> * This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes * {@link #doEncoding(byte [])} method of a concrete class to perform the specific encoding. * * @param text * a string to encode * @param charsetName * the charset to use * @return RFC 1522 compliant "encoded-word" * @throws EncoderException * thrown if there is an error condition during the Encoding process. * @throws UnsupportedEncodingException * if charset is not available * * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a> */ protected String encodeText(final String text, final String charsetName) throws EncoderException, UnsupportedEncodingException { if (text == null) { return null; } return this.encodeText(text, Charset.forName(charsetName)); }
/** * Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. * <p> * This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes * {@link #doEncoding(byte [])} method of a concrete class to perform the specific encoding. * * @param text * a string to encode * @param charsetName * the charset to use * @return RFC 1522 compliant "encoded-word" * @throws EncoderException * thrown if there is an error condition during the Encoding process. * @throws UnsupportedEncodingException * if charset is not available * * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a> */ protected String encodeText(final String text, final String charsetName) throws EncoderException, UnsupportedEncodingException { if (text == null) { return null; } return this.encodeText(text, Charset.forName(charsetName)); }
/** * Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. * <p> * This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes * {@link #doEncoding(byte [])} method of a concrete class to perform the specific encoding. * * @param text * a string to encode * @param charsetName * the charset to use * @return RFC 1522 compliant "encoded-word" * @throws EncoderException * thrown if there is an error condition during the Encoding process. * @throws UnsupportedEncodingException * if charset is not available * * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a> */ protected String encodeText(final String text, final String charsetName) throws EncoderException, UnsupportedEncodingException { if (text == null) { return null; } return this.encodeText(text, Charset.forName(charsetName)); }
/** * Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. * <p> * This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes * {@link #doEncoding(byte [])} method of a concrete class to perform the specific encoding. * * @param text * a string to encode * @param charsetName * the charset to use * @return RFC 1522 compliant "encoded-word" * @throws EncoderException * thrown if there is an error condition during the Encoding process. * @throws UnsupportedEncodingException * if charset is not available * * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a> */ protected String encodeText(final String text, final String charsetName) throws EncoderException, UnsupportedEncodingException { if (text == null) { return null; } return this.encodeText(text, Charset.forName(charsetName)); }
/** * Applies an RFC 1522 compliant encoding scheme to the given string of text with the given charset. * <p> * This method constructs the "encoded-word" header common to all the RFC 1522 codecs and then invokes * {@link #doEncoding(byte [])} method of a concrete class to perform the specific encoding. * * @param text * a string to encode * @param charsetName * the charset to use * @return RFC 1522 compliant "encoded-word" * @throws EncoderException * thrown if there is an error condition during the Encoding process. * @throws UnsupportedEncodingException * if charset is not available * * @see <a href="http://download.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a> */ protected String encodeText(final String text, final String charsetName) throws EncoderException, UnsupportedEncodingException { if (text == null) { return null; } return this.encodeText(text, Charset.forName(charsetName)); }