code: public void write(WARCRecord record) throws IOException {
          if (bytesWritten > maxSegmentSize) {
              dataStream.close();
              createSegment();
          }
          record.write(dataStream);
      }
docs: Appends a {@link WARCRecord} to the file, in WARC/1.0 format.
  @param record The record to be written.
  @throws IOException