Either call close() or get().close() when finished with this handle to close the underlying InputStream.
13886
@Override
  public void close() {
    if ( content != null ) {
      try {
        content.close();
      } catch (IOException e) {
        logger.error("Failed to close underlying InputStream",e);
        throw new MarkLogicIOException(e);
      }
    }
  }
1045171
def close(self):
        """"""
        self.flush()
        self.stream.close()
        logging.StreamHandler.close(self)
719188
@Override
    public void close() throws IOException {
        if (isClosed()) {
            return;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Closing stream: hc: " + this.hashCode() + " details: " + this);
        }
        this.closed = true;
        this.ignoreFlush = false;
        try {
            flushBuffers();
        } finally {
            // must release the buffers even if the flush fails
            clear();
        }
    }
78553
@Override
    public void close() throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "The input stream has been closed : " + this + " read Listener running ->" + listener);
        
        isClosed = true;
        listener = null;
        
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "The input stream has been closed : " + this + " read Listener ->" + listener);
        
        super.close();
    }
119080
public void close() throws IOException {
        if (!closed) {
            finish();
            if (usesDefaultDeflater)
                def.end();
            out.close();
            closed = true;
        }
    }
1097867
@Override
  public void close() throws IOException {
    if (inputStream != null) {
      inputStream.close();
      inputStream = null;
    }

    if (buffer != null) {
      buffer = null;
    }
  }
276513
public void close() throws IOException
  {
    HttpStream stream = _stream;
    _stream = null;

    if (stream != null)
      stream.close();
  }
993555
void closeImpl()
  {
    ReadStreamOld is = _is;
    _is = null;

    WriteStreamOld os = _os;
    _os = null;

    try {
      if (is != null)
        is.close();
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
    }

    try {
      if (os != null)
        os.close();
    } catch (Throwable e) {
      log.log(Level.FINER, e.toString(), e);
    }

    if (is != null) {
      _connProbe.end();

      if (_requestStartTime > 0)
        _requestTimeProbe.end(_requestStartTime);

      if (_isIdle)
        _idleProbe.end();
    }
  }
339989
@Override
    public void close()
        throws IOException
    {
        InputStream in = _inputSource;

        if (in != null) {
            _inputSource = null;
            if (_autoClose) {
                in.close();
            }
        }
        freeBuffers();
    }
568578
@Override
    public void close() {
        if (!closed.compareAndSet(false, true))
            return;

        //is synchronized with itself and _next calls,
        //so no synchronization on inner reader is needed
        try {
            synchronized (inputStream) {
                inputStream.close();
            }
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
    }
1065442
public void close() {
        open = false;
        try {
            os.flush();
            if (closeStream)
                os.close();
        }
        catch(IOException ioe) {
            throw new ExceptionConverter(ioe);
        }
    }
412976
public void close() throws java.io.IOException{
        synchronized(this){
            if(_outHelper.isOutputStream_closed()){
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "output stream close previously completed ...return ");
                }
                return;
            }
            else{
                _outHelper.closeWork();
            }
        }
    }
129964
public void close()
        throws IOException
    {        
        // Are we already closed?
        if (_out==null)
            return;
        _closing=true;
        // Close
        try {
            notify(OutputObserver.__CLOSING);

            OutputStream out =_out;
            _out=null;
            
            if (out!=_bufferedOut)
                out.close();
            else
                _bufferedOut.close();
            
            notify(OutputObserver.__CLOSED);
        }
        catch (IOException e)
        {
            LogSupport.ignore(log,e);
        }
    }
1246279
public static void closeEL(InputStream is) {
	try {
	    if (is != null) is.close();
	}
	// catch (AlwaysThrow at) {throw at;}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	}
    }
902617
public void close() throws IOException {
		if (!closed) {
			if (usesDefaultInflater)
				inf.end();
			in.close();
			closed = true;
		}
	}
1145934
@Override
    public void close() throws IOException {
        try {
            if (reference != null) {
                closer.close(reference);
            }
        } catch (Exception e) {
            throw new IOException(e);
        } finally {
            this.wasClosed = true;
        }
    }
1094811
@Override
  public void close() throws IOException {
    if (!closed) {
      objectOutputStream.close();
      fileOutputStream.close();
      closed = true;
    }
  }