code: public static String encodeBase64(final String data) {
          return Base64.encodeBase64String(data.getBytes(StandardCharsets.UTF_8));
      }
docs: Base64-encode the given string as a string.
  
  @param data the String to encode
  @return the encoded string