code: public static String encode(final String input, final boolean urlSafeEncoding) {
  		return new String(encode(input.getBytes(charsetUTF8), urlSafeEncoding), charsetISOLatin1);
  	}
docs: Encode to Base64
  
  @param input
  @param urlSafeEncoding
  @return