Reset the state of the writer and flush already written content.
423647
protected void reset() {
        writer.flush();
        stack.clear();
        context = new JsonContext(JsonContext.Mode.VALUE);
    }
837924
public void reset ()
  {
    resetBuffer ();
    m_aCharacterEncoding = null;
    m_nContentLength = 0;
    m_sContentType = null;
    m_aLocale = null;
    m_aCookies.clear ();
    m_aHeaders.clear ();
    m_nStatus = HttpServletResponse.SC_OK;
    m_sErrorMessage = null;
  }
1030575
private void flush() {
    	switch(state){
    	case TEXT:
    	case CDATA:
            if(text.length() > 0) {
                doc.text(text.toString());
            }
            break;
    	case COMMENT:
        	if (comment != null) {
                comment.comment(text.toString());
            }
        	break;
    	case ATTRIBUTE_KEY:
            attributekey = text.toString();
            if (html)
                attributekey = attributekey.toLowerCase();
    		break;
    	case QUOTE:
    	case ATTRIBUTE_VALUE:
        	attributevalue = text.toString();
            attributes.put(attributekey,attributevalue);
            break;
    	default:
    		// do nothing
    	}
        text.setLength(0);
    }
960516
def flush(self):
        """"""
        if self.mode != 'r':
            with self.mutex:
                self.zf.close()
                # N.B., re-open with mode 'a' regardless of initial mode so we don't wipe
                # what's been written
                self.zf = zipfile.ZipFile(self.path, mode='a',
                                          compression=self.compression,
                                          allowZip64=self.allowZip64)
201193
public void flush() throws IOException
    {
        super.flush();
        if (_complete&&!_completed)
        {
            _completed=true;

            _packet.resetData();
            _packet.addByte(AJP13ResponsePacket.__END_RESPONSE);
            _packet.addBoolean(_persistent);
            _packet.setDataSize();
            write(_packet);
            _packet.resetData();
        }
    }
1230482
def Reset(self):
    """"""
    # The first state
    self.state = "INITIAL"
    self.state_stack = []

    # The buffer we are parsing now
    self.buffer = ""
    self.error = 0
    self.verbose = 0

    # The index into the buffer where we are currently pointing
    self.processed = 0
    self.processed_buffer = ""
727194
def flush(self):
        
        self._write_all(self._wbuffer.getvalue())
        self._wbuffer = BytesIO()
        return
533235
public function flush()
    {
        if (!empty($this->documents)) {
            $this->resource->addDocuments($this->storeId, $this->documents);
            $this->clearDocuments();
        }
    }
119573
def flush(self):
        
        self._write_all(self._wbuffer.getvalue())
        self._wbuffer = StringIO()
        return
936617
def flush(self):
        

        self.clear()
        self.delete(self.session_key)
        self.create()
440553
public void flush()
        throws IOException
    {
        try
        {
            if (!_commited)
            {
                _commited=true;
                if (_commitObserver!=null)
                    _commitObserver.outputNotify(this,OutputObserver.__COMMITING,null);
            }
            
            wrapBuffer();
            
            // Add headers
            if (_httpMessageWriter.size()>0)
            {
                prewrite(_httpMessageWriter.getBuf(),0,_httpMessageWriter.size());
                _httpMessageWriter.resetWriter();
            }
            
            if (size()>0)
                writeTo(_out);
        }
        catch (IOException e)
        {
            throw new EOFException(e);
        }
        finally
        {
            reset(_preReserve);
        }
    }
357829
@SuppressWarnings("deprecation")
    public void flush() throws SAXException {
        if (!alreadyComplainedAboutThisRun
                && !Normalizer.isNormalized(buf, 0, pos, Normalizer.NFC, 0)) {
            errAboutTextRun();
        }
        reset();
    }
1053685
protected void flush() throws IOException {
		if (this.tempStream != null && this.buffer.position() > 0) {
			final int pos = this.buffer.position();
			this.buffer.rewind();
			this.buffer.limit(pos);

			this.tempStream.write(this.buffer);

			this.buffer.rewind();
			this.buffer.limit(this.buffer.capacity());

			this.bufferPosition += pos;
		}
	}
581845
public function flush()
    {
        if ($this->recordSize === 0) {
            return;
        }

        $str = '';
        foreach ($this->records as $record) {
            $str .= $this->recordFormat($record);
        }

        $this->clear();
        $this->write($str);
    }
1327957
@Override
    public final void flush()
        throws IOException
    {
        _flushBuffer();
        if (_writer != null) {
            if (isEnabled(Feature.FLUSH_PASSED_TO_STREAM)) {
                _writer.flush();
            }
        }
    }
651751
final public function clearContent()
    {
        $reset = [
            &$this->content,
            &$this->contentRaw,
        ];

        foreach ($reset as &$property) {
            $property = [];
        }
    }
1347855
def flush(self):
        
        if self._writable:
            with self._seek_lock:
                self._flush_raw_or_buffered()

                # Clear the buffer
                self._write_buffer = bytearray(self._buffer_size)
                self._buffer_seek = 0