code: protected void preWriteRecordTasks()
      throws IOException {
          if (this.out == null) {
              createFile();
          }
          if (settings.getCompress()) {
              // Wrap stream in GZIP Writer.
              // The below construction immediately writes the GZIP 'default'
              // header out on the underlying stream.
              this.out = new CompressedStream(this.out);
          }
      }
docs: Post write tasks.
  
  Has side effects.  Will open new file if we're at the upper bound.
  If we're writing compressed files, it will wrap output stream with a
  GZIP writer with side effect that GZIP header is written out on the
  stream.
  
  @exception IOException