public static String encodeToString ( byte [ ] input , int flags ) { try { return new String ( encode ( input , flags ) , "US-ASCII" ) ; } catch ( UnsupportedEncodingException e ) { // US-ASCII is guaranteed to be available. throw new AssertionError ( e ) ; } }
Base64 - encode the given data and return a newly allocated String with the result .