code: @Override
    public void close() throws IOException {
      if (out != null) {
        try {
          long startTime = System.nanoTime();
          out.close();
          long duration = System.nanoTime() - startTime;
          ghfs.increment(GoogleHadoopFileSystemBase.Counter.WRITE_CLOSE);
          ghfs.increment(GoogleHadoopFileSystemBase.Counter.WRITE_CLOSE_TIME, duration);
          long streamDuration = System.nanoTime() - initTime;
          ghfs.increment(GoogleHadoopFileSystemBase.Counter.OUTPUT_STREAM);
          ghfs.increment(GoogleHadoopFileSystemBase.Counter.OUTPUT_STREAM_TIME, streamDuration);
          logger.atFine().log("close(%s)", gcsPath);
        } finally {
          out = null;
          channel = null;
        }
      }
    }
docs: Closes this output stream and releases any system resources associated with this stream.