Code example for UnsupportedEncodingException

Methods: toString

            return encode(s,null);
        catch (UnsupportedEncodingException e)
            throw new IllegalArgumentException(e.toString());
    // ------------------------------------------------------------------ 
     * Base 64 encode as described in RFC 1421. 
     * <p>Does not insert whitespace as described in RFC 1521. 
     * @param s String to encode. 
     * @param charEncoding String representing the name of 
     *        the character encoding of the provided input String. 
     * @return String containing the encoded form of the input. 
    static public String encode(String s,String charEncoding)
            throws UnsupportedEncodingException 
Stop searching for code, let great code find you!  Add Codota to your java IDE