code: protected void writeToSerializedStream(ObjectOutputStream stream) throws IOException {
          stream.writeLong(cas);
          stream.writeInt(expiry);
          stream.writeUTF(id);
          stream.writeObject(content);
          stream.writeObject(mutationToken);
      }
docs: Helper method to write the current document state to the output stream for serialization purposes.
  
  @param stream the stream to write to.
  @throws IOException