code: protected OutputStream createStagingFileOutputStream()
        throws IOException {
      OutputStream out = this.fs
          .create(this.stagingFile, this.filePermission, true, this.bufferSize, this.replicationFactor, this.blockSize,
              null);
  
      // encoders need to be attached to the stream in reverse order since we should write to the
      // innermost encoder first
      for (StreamCodec encoder : Lists.reverse(getEncoders())) {
        out = encoder.encodeOutputStream(out);
      }
  
      return this.closer.register(out);
    }
docs: Create the staging output file and an {@link OutputStream} to write to the file.
  
  @return an {@link OutputStream} to write to the staging file
  @throws IOException if it fails to create the file and the {@link OutputStream}