Closes the write half of the stream.
432506
@Override
  public void closeWrite() throws IOException
  {
    if (_isCloseWrite) {
      return;
    }
    
    _isCloseWrite = true;
    
    OutputStream os = _os;
    _os = null;
    
    boolean isShutdownOutput = false;

    // since the output stream is opened lazily, we might
    // need to open it
    if (_s instanceof SSLSocket) {
      // ssl socket cannot be half-closed
      log.finer(L.l("sslSocket can not be half-closed"));
      return;
    }
    else if (_s != null) {
      try {
        _s.shutdownOutput();
        
        isShutdownOutput = true;
      } catch (UnsupportedOperationException e) {
        log.log(Level.FINEST, e.toString(), e);
      } catch (Exception e) {
        log.finer(e.toString());
        log.log(Level.FINEST, e.toString(), e);
      }
    }

    // SSLSocket doesn't support shutdownOutput()
    if (! isShutdownOutput && os != null) {
      os.close();
    }
  }
803104
public void close() {
        lock.lock();
        try {
            if (writeTarget == null) {
                closePending = true;
                return;
            }
        } finally {
            lock.unlock();
        }
        writeTarget.closeConnection();
    }
692063
public void close() throws IOException {
        if (dataStream != null) dataStream.close();
        byteStream = null;
        dataStream = null;
    }
217943
@Override
	@SuppressWarnings("checkstyle:magicnumber")
	public void close() throws IOException {
		if (this.stream != null) {
			//End of file (1Ah)
			this.stream.write(0x1A);
			this.stream.close();
			this.stream = null;
		}

		if (this.columns != null) {
			this.columns.clear();
			this.columns = null;
		}
	}
904964
public static void close (Writer out)
    {
        if (out != null) {
            try {
                out.close();
            } catch (IOException ioe) {
                log.warning("Error closing writer", "writer", out, "cause", ioe);
            }
        }
    }
953886
@Override
	public void close() throws IOException {
		if (this.stream != null) {
			this.stream.write(this.buffer, 0, this.pos);
		}
		
		// close file stream
		super.close();
	}
627841
public void close() {
        // getting a read lock will ensure all writes have finished
        // if we are really closing assume that we don't care about reads
        readLock.lock();
        try {
            if (container != null) {
                try {
                    container.close();
                    container = null;
                    log.info("Closed container");
                } catch (XmlException e) {
                    log.warn("close failed: " + e.getMessage(), e);
                }
            }

            if (manager != null) {
                try {
                    manager.close();
                    manager = null;
                    log.info("Closed manager");
                } catch (XmlException e) {
                    log.warn("close failed: " + e.getMessage(), e);
                }
            }
        } finally {
            readLock.unlock();
        }
    }
104641
public void writeCloseFunction(Writer writer) throws IOException {
		writer.append(TAB).append(CLOSEBRACE).append(CR);
	}
238230
public void close() {
    try {
      flush();
      pw.close();
      rawWriter.close();
    } catch (IOException e) {
      Throwables.propagate(e);
    }
  }
388292
@Override
    public void close() throws IOException {
        if (!closed) {
            try {
                if (!eof && state != CHUNK_INVALID) {
                    // read and discard the remainder of the message
                    final byte[] buff = new byte[BUFFER_SIZE];
                    try {
                        while (read(buff) >= 0) {
                           continue;
                        }
                    } catch (ConnectionClosedException e) {
                        // just ignore
                    } catch (TruncatedChunkException e) {
                        // just ignore
                    }
                }
            } finally {
                eof = true;
                closed = true;
            }
        }
    }
207672
public void close() throws IOException {
		if (thread.isAlive()) {
			thread.closed = true;
			thread.interrupt();
		}

		if (stream != null) {
			stream.close();
		}
	}
641921
def close(self):
        
        if self._writable and not self._is_raw_of_buffered and not self._closed:
            self._closed = True
            if self._write_buffer:
                self.flush()
1176222
protected synchronized void close() {

        this.closed = true;

        setReadable(false);
        setWritable(false);
        freeOutputStream();
        freeInputStream();

        this.gzdata = null;
    }
1256802
def close(self):
        
        if self._writable and not self._closed:
            self._closed = True
            with self._seek_lock:
                self._flush_raw_or_buffered()
            if self._seek:
                with handle_os_exceptions():
                    self._close_writable()
1305633
public function stream_close()
    {
        $this->_objectName = null;
        $this->_objectBuffer = null;
        $this->_objectSize = 0;
        $this->_position = 0;
        $this->_writeBuffer = false;
        unset($this->_oss);
    }
527234
public static void closeQuietly(XMLStreamWriter writer) {
        if (writer != null) {
            try {
                writer.close();
            } catch (XMLStreamException e) {
                logger.warn("Error while closing", e);
            }
        }
    }
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;
            }
        }
    }