public static String encodeBase64 ( String data ) { byte [ ] bytes = null ; try { bytes = data . getBytes ( "ISO-8859-1" ) ; } catch ( UnsupportedEncodingException uee ) { throw new IllegalStateException ( uee ) ; } return encodeBase64 ( bytes ) ; }
Encodes a String as a base64 String .