code: @Override
      protected void _to(ObjectOutput out) throws IOException {
          // 1: write the number of document headers
          out.writeInt(headers.size());
          for (DocumentHeader header : headers) {
              // 1: write each document header
              header.writeExternal(out);
          }
      }
docs: {@inheritDoc}