Finish response stream by closing.
@throws IOException
192924
public void finish() throws IOException {
        if (printWriter != null) {
            printWriter.close();
        }

        if (outputStream != null) {
            outputStream.close();
        }
    }
1342844
@Override
    public void close() throws IOException
    {
        InputStream in = mIn;

        if (in != null) {
            mIn = null;
            freeBuffers();
            in.close();
        }
    }
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();
            }
        }
    }
1075963
@Override
    public void close() {
        if (!closed) {
            closed = true;
            try {
                response.getOutputStream().close();
                HttpServletRequest req = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST);
                if (req != null) {
                    req.getAsyncContext().complete();
                }
            } catch (Exception ex) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Failed to close response stream", ex);
                }
            } finally {
                ServerProviderFactory.releaseRequestState(message);
            }
            
            //TODO: remove from all broadcasters
        }

    }
689412
public void close() throws IOException
  {
    unlock();

    _fileChannel = null;

    InputStream is = _is;
    _is = null;
    
    if (is != null)
      is.close();
  }
1246378
public void finish() {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.entering(CLASS_NAME,"finish","["+this+"]");

        if (!isCommitted()) {
            commit();
        }

        // flush the OutputStream and Writer
        try {
            flushBuffer(false);
            _rawOut.close();
        }
        catch (IOException e) {
            // Don't want to report errors on early browser closes
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"finish", "Servlet.Exception:.Error.while.finishing.response", e);
            }
        }
        finally {
            _rawOut.reset();
            // PK29451 - remove call to clearHeaders(). Implementation of clearHeaders() was empty,
            // which this method relies on, but has been implemented in PK29451 to make reset() work.
            // _response.clearHeaders();
            
            cleanupFromFinish();
            // LIBERTY _bufferedOut.reset();
            _bufferedWriter.reset();
            // LIBERTY this._responseBuffer = null;
        }

        resetState();

        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
            logger.exiting(CLASS_NAME,"finish");
    }
125675
@Override
  public void close() throws IOException {
    try {
      this.pool.returnObject(this.object);
    } catch (Exception exc) {
      throw new IOException(exc);
    } finally {
      this.returned = true;
    }
  }
152195
@Override
    public void close() throws IOException {
    	if (readAllBytesInternal() || isAborted()) {
            super.close();
        } else {
            LOG.warn(
                    "Not all bytes were read from the S3ObjectInputStream, aborting HTTP connection. This is likely an error and " +
                    "may result in sub-optimal behavior. Request only the bytes you need via a ranged GET or drain the input " +
                    "stream after use.");
            if (httpRequest != null) {
                httpRequest.abort();
            }
            IOUtils.closeQuietly(in, null);
        }
    }
153244
@Override
    public void close() throws IOException {
        InputStream is = getObjectContent();
        if (is != null)
            is.close();
    }
1180458
public void finish() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Finishing " + this);
        }
        // if there is a print writer, flush any content unless it is already
        // closed. We don't need to do this with streams.
        if (null != this.outWriter) {
            this.outWriter.checkError();
        }
    }
699411
@Override
    public void close()
            throws IOException
    {
        if (closed) {
            return;
        }
        try {
            flush();
            out.close();
        }
        finally {
            closed = true;
            inputBufferAllocator.release(inputBuffer);
            outputBufferAllocator.release(outputBuffer);
            inputBuffer = null;
            outputBuffer = null;
        }
    }
808420
public void finish() throws IOException 
    {
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"finish", "finish");
        } 
        // PM18453 start
        WebContainerRequestState requestState = WebContainerRequestState.getInstance(false);
        if (requestState != null && (Boolean.valueOf((String)requestState.getAttribute("InputStreamEarlyReadCompleted"))).booleanValue()) {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"finish", "Skip read because data has already been read and destroyed.");
            } 
            total=limit;
        }
        // PM18453 End
        else if (!SRTServletResponse.isSkipInputStreamRead() &&  length != -1 )        {
            // if content length set then skip remaining bytes in message body
            long remaining = limit - total;   // PK79219
            while ( remaining > 0 )
            {
                long n = skip(remaining);   // PM03146
                if ( n == 0 )
                {
                    // begin 280584.3    6021: Cleanup of  defect 280584.2    WAS.webcontainer
                    //logger.logp(Level.SEVERE, CLASS_NAME,"finish", nls.getString("Invalid.Content.Length"));
                    // end 280584.3    6021: Cleanup of  defect 280584.2    WAS.webcontainer
                    throw new IOException(nls.getString("Invalid.Content.Length","Invalid content length"));
                }
                remaining -= n;
            }
        }
    }
1311417
@Override
  public void close() throws IOException
  {
    Socket s = _s;
    _s = null;

    OutputStream os = _os;
    _os = null;

    InputStream is = _is;
    _is = null;

    try {
      if (os != null)
        os.close();
      
      if (is != null)
        is.close();
    } finally {
      if (s != null)
        s.close();
    }
  }
515305
public void close() throws IOException {
        if (in != null) {
            try {
                // Clean up
                if (usesDefaultDeflater) {
                    def.end();
                }

                in.close();
            } finally {
                in = null;
            }
        }
    }
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;
            }
        }
    }
339989
@Override
    public void close()
        throws IOException
    {
        InputStream in = _inputSource;

        if (in != null) {
            _inputSource = null;
            if (_autoClose) {
                in.close();
            }
        }
        freeBuffers();
    }
381413
@Override
    public void close() throws IOException {
        // Is the pipe connected?
        PipedInputStream stream = target;
        if (stream != null) {
            stream.done();
            target = null;
        }
    }