code: public void flush() throws IOException
      {   
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "flush");
          boolean crlfWrite = false;
          // check for nonblocking
          if(this._listener!= null){
              synchronized(this){
  
                  WebContainerRequestState reqState = WebContainerRequestState.getInstance(false);
                  if (reqState!=null && reqState.getAttribute("com.ibm.ws.webcontainer.CRLFWriteinPorgress")!=null){                                      
                      crlfWrite = true;
                  }
                  if(this.isWriteReadyWork(false) || crlfWrite ){
                      super.flush();
                  }
                  else{
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          Tr.debug(tc, "cannot flush, not write ready");
                      
                      return;
                  }
              }
          }
          else{
              super.flush();
          }
      }
docs: /*
  @see java.io.OutputStream#flush()