docs: public static void serialize(Object value, OutputStream outputStream) throws IOException {
      try {
        new ObjectOutputStream(outputStream).writeObject(value);
      } finally {
        outputStream.close();
      }
    }