Closes the stream with a sink operator.
481547
def sink(self):
        """"""
        op = Operator(
            _generate_uuid(),
            OpType.Sink,
            "Sink",
            num_instances=self.env.config.parallelism)
        return self.__register(op)
1261043
public void close() throws IOException {
        if (this.debug) {
            System.err.println("TarBuffer.closeBuffer().");
        }

        if (this.outStream != null) {
            this.flushBlock();

            if (this.outStream != System.out && this.outStream != System.err) {
                this.outStream.close();
                this.outStream = null;
            }
        } else if (this.inStream != null) {
            if (this.inStream != System.in) {
                this.inStream.close();
                this.inStream = null;
            }
        }
    }
133929
protected function close()
    {
        if (is_resource($this->stream)) {
            $this->flush();
            fclose($this->stream);
        }
        $this->stream = false;
    }
768397
def close_stream(self):
        
        if self.fout:
            fout = self.fout
            fout_fn = self.fout_fn
            self.fout.flush()
            self.fout.close()
            self.fout = None
            self.fout_fn = None
            return fout_fn
283540
public static void close (OutputStream out)
    {
        if (out != null) {
            try {
                out.close();
            } catch (IOException ioe) {
                log.warning("Error closing output stream", "stream", out, "cause", ioe);
            }
        }
    }
1138791
public synchronized void close() throws IOException {
        if (logStream != null) {
            logStream.close();
        }
        for (FileOutputStream log : streamsToFlush) {
            log.close();
        }
    }
922764
public function stream_close() {
    assert(isset($this->client));
    $this->client->close();
    $this->client = null;
  }
1239524
@Override
  public void close() throws IOException {
    checkState(isInitialized, "initialize() must be invoked before use.");
    if (isOpen()) {
      try {
        pipeSinkChannel.close();
        handleResponse(waitForCompletionAndThrowIfUploadFailed());
      } finally {
        pipeSinkChannel = null;
        uploadOperation = null;
      }
    }
  }
679787
public void close() {
		if (blk != null) {
			tx.bufferMgr().unpin(currentBuff);
			blk = null;
			currentBuff = null;
		}
	}
1157756
public function stream_close()
    {
        if ($this->data == null) {
            return;
        }

        $this->stream_flush();

        $this->data = null;
        $this->path = null;
        $this->save = false;
        $this->dirty = null;
        $this->metadata = array();
    }
948480
public function close()
    {
        if ($this->stream === null) {
            return;
        }
        $this->flush();
        if (false === @fclose($this->stream)) {
            $metaData = stream_get_meta_data($this->stream);
            $resource = $metaData["uri"];
            $msg = "Cannot close " . $resource . ": $php_errormsg";
            throw new IOException($msg);
        }
        $this->stream = null;
    }
689412
public void close() throws IOException
  {
    unlock();

    _fileChannel = null;

    InputStream is = _is;
    _is = null;
    
    if (is != null)
      is.close();
  }
963345
public void close()
    {
    IOUtils.closeQuietly( source_);
    try
      {
      complete();
      }
    catch( Exception e)
      {
      logger_.error( "Can't complete filtering", e);
      }
    }
804729
static void closeOthers(final SimpleReactStream active, final List<SimpleReactStream> all) {
        all.stream()
           .filter(next -> next != active)
           .filter(s -> s instanceof BaseSimpleReactStream)
           .forEach(SimpleReactStream::cancel);

    }
97466
@Override
    public synchronized void close() {
        if (currentStatus != StreamStatus.CLOSED) {
            // Only flush the print stream: don't close it.
            currentPrintStream.flush();

            if (!LoggingFileUtils.tryToClose(currentPrintStream)) {
                LoggingFileUtils.tryToClose(currentFileStream);
            }

            // Send to bit bucket again-- this holder is done (false -- do not replace)
            setStreamStatus(StreamStatus.CLOSED, null, null, DummyOutputStream.psInstance);
        }
    }
902617
public void close() throws IOException {
		if (!closed) {
			if (usesDefaultInflater)
				inf.end();
			in.close();
			closed = true;
		}
	}
890340
void close(ClientSocket stream)
  {
    if (log.isLoggable(Level.FINER))
      log.finer("close " + stream);

    _activeCount.decrementAndGet();
  }