docs: public static String encode(Object o) throws IOException {
      if (o instanceof Serializable) {
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream;
        try {
          objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
          objectOutputStream.writeObject(o);
          objectOutputStream.close();
          byte[] byteArray = byteArrayOutputStream.toByteArray();
          return Base64.byteArrayToBase64(byteArray);
        } catch (IOException e) {
          e.printStackTrace();
          log.error(e);
          return null;
        }
      } else {
        throw new IOException("no serializable object");
      }
    }