docs: private void writeObject(ObjectOutputStream out) throws IOException {
      out.defaultWriteObject();
  
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      save(baos);
  
      byte[] data = baos.toByteArray();
  
      out.writeInt(data.length);
      out.write(data);
    }