Close the stream.
485483
@Override
  public final void close()
  {
    try {
      TempBufferData tempBuffer = _tempRead;
      
      if (tempBuffer != null && ! _isReuseBuffer) {
        _tempRead = null;
        _readBuffer = null;

        tempBuffer.free();
      }

      if (_source != null) {
        StreamImpl s = _source;
        _source = null;
        s.close();
      }
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
983982
def stop(self):
        """"""
        if self.thread:
            self.running = False
            if isinstance(self.stream, ReadWriteStream):
                self.stream.write(b'\0' * self.chunk_size)
            self.thread.join()
            self.thread = None

        self.engine.stop()

        if self.pa:
            self.pa.terminate()
            self.stream.stop_stream()
            self.stream = self.pa = None
926320
public function shutdown()
    {
        if (is_resource($this->_stream)) {
            fflush($this->_stream);
            fclose($this->_stream);
            $this->_stream = null;
        }
    }
1255052
def close(self):
        
        if self._closed:
            return
        self._closed = True
        self._writer.endElementNS((namespaces.xmlstream, "stream"), None)
        for prefix in self._nsmap_to_use:
            self._writer.endPrefixMapping(prefix)
        self._writer.endDocument()
        del self._writer
885439
public void close() {
        if (this.m_stream != null) {
            try {
                this.m_stream.close();
                this.m_stream = null;
            } catch (IOException e) {
                logger.warn("Error closing stream", e);
            }
        }
    }
381163
@Override
    public final void close() {
        if (this.inputStream != null) {
            try {
                this.inputStream.close();
            } catch (IOException ioe) {
                logger.error("Unable to close output stream.", ioe);
            } finally {
                this.inputStream = null;
            }
        }

        dispose();
    }
1305633
public function stream_close()
    {
        $this->_objectName = null;
        $this->_objectBuffer = null;
        $this->_objectSize = 0;
        $this->_position = 0;
        $this->_writeBuffer = false;
        unset($this->_oss);
    }
74037
function close()
    {
        $this->flush();
        $this->_opened = false;
        if ($this->_closeResource === true && is_resource($this->_stream)) {
            fclose($this->_stream);
        }
        return true;
    }
185089
public static void safeClose(final Closeable stream) {
		if (stream != null) {
			try {
				stream.close();
			} catch (IOException e) {
				LOG.error("Failed to close resource stream", e);
			}
		}
	}
658119
def close(self):
        """"""
        if self._audio_stream:
            self.stop()
            self._audio_stream.close()
            self._audio_stream = None
1304627
public function closeInputStream()
    {
        if (!is_null($this->_inputStream)) {
            fclose($this->_inputStream);
            $this->_inputStream = null;
        }
    }
936287
def close_async(self):
        """"""
        if self._stream is None or self._stream.closed():
            self._stream = None
            return
        send_data = struct.pack('<i', 1) + int2byte(COMMAND.COM_QUIT)
        yield self._stream.write(send_data)
        self.close()
1028556
def close(self):
        
        self.closed = True
        self._flush_bits_to_stream()
        self._stream.close()
368107
@Override
    public final void close() {
        dispose();

        if (this.outputWriter != null) {
            try {
                this.outputWriter.close();
            } catch (IOException ioe) {
                logger.error("Unable to close output stream.", ioe);
            } finally {
                this.outputWriter = null;
            }
        }
    }
648824
def close(self):
        
        self.flush()
        try:
            if self.stream is not None:
                self.stream.flush()
                _name = self.stream.name
                self.stream.close()
                self.client.copy(_name, self.filename)
        except Exception as ex:
            print str(ex)
            pass
775380
@Override
    public void close() {
        if (this.inputStream != null) {
            try {
                this.inputStream.close();
            } catch (final IOException e) {
                // Ignore
            }
            this.inputStream = null;
        }
        this.byteBuffer = null;
        this.buf = null;
    }
525955
def close(self):
        """"""
        if self.tabix_file and not self.tabix_file.closed:
            self.tabix_file.close()
        if self.stream:
            self.stream.close()