private static String privateBase64Encoder ( String toEncode , int flags ) { byte [ ] data = null ; try { data = toEncode . getBytes ( "UTF-8" ) ; } catch ( UnsupportedEncodingException e1 ) { e1 . printStackTrace ( ) ; } if ( flags == - 1 ) { flags = Base64 . DEFAULT ; } return Base64 . encodeToString ( data , flags ) ; }
private Encoder in base64