Flush the write buffers of the stream.
541301
def _flush(self):
        
        # Upload segment with workers
        name = self._segment_name % self._seek
        response = self._workers.submit(
            self._client.put_object, self._container, name,
            self._get_buffer())

        # Save segment information in manifest
        self._write_futures.append(dict(
            etag=response, path='/'.join((self._container, name))))
378281
private synchronized void flushData() {
        BufferedWriter writer = null;
        try {
            writer = new BufferedWriter(new FileWriter(new File(this.inputPath)));
            for(String key: this.metadataMap.keySet()) {
                writer.write(NEW_PROPERTY_SEPARATOR + key.toString() + "]" + NEW_LINE);
                writer.write(this.metadataMap.get(key).toString());
                writer.write("" + NEW_LINE + "" + NEW_LINE);
            }
            writer.flush();
        } catch(IOException e) {
            logger.error("IO exception while flushing data to file backed storage: "
                         + e.getMessage());
        }

        try {
            if(writer != null)
                writer.close();
        } catch(Exception e) {
            logger.error("Error while flushing data to file backed storage: " + e.getMessage());
        }
    }
827837
private function flush()
    {
        $keepWriting = true;
        while ($keepWriting) {
            $message = $this->messages[0]['message'];
            $promise = $this->messages[0]['promise'];

            $bytesWritten = @fwrite($this->output, $message);

            if ($bytesWritten > 0) {
                $message = substr($message, $bytesWritten);
            }

            // Determine if this message was completely sent
            if (strlen($message) === 0) {
                array_shift($this->messages);

                // This was the last message in the queue, remove the write handler.
                if (count($this->messages) === 0) {
                    Loop\removeWriteStream($this->output);
                    $keepWriting = false;
                }

                $promise->fulfill();
            } else {
                $this->messages[0]['message'] = $message;
                $keepWriting = false;
            }
        }
    }
408449
public void flush()
  {
    if (!enabled)
    {
      return;
    }
    if (!queue.isEmpty())
    {
      // start a new thread to upload without blocking the current thread
      Runnable runUpload = new TelemetryUploader(this, exportQueueToString());
      uploader.execute(runUpload);
    }
  }
923418
private void flushBuffer(boolean close) {
    for (HttpImageUploadChannel ch : uploadChannels) {
      ch.send(buffer);
    }
    if (!close) {
      // allocate new buffer, since the old one is used by the channels for
      // reading
      buffer = new ByteArrayOutputStream((int) (1.2 * flushSize));
    }
  }
916415
function flush()
    {
        /*
         * If output buffering is enabled, dump the contents of the buffer to
         * the output stream.
         */
        if ($this->_buffering && (strlen($this->_buffer) > 0)) {
            fwrite($this->_stream, $this->_buffer);
            $this->_buffer = '';
        }

        if (is_resource($this->_stream)) {
            return fflush($this->_stream);
        }

        return false;
    }
1076769
def flush(self):
        
        if self._writable:
            with self._seek_lock:
                buffer = self._get_buffer()

                # Flush that part of the file
                end = self._seek
                start = end - len(buffer)

                # Clear buffer
                self._write_buffer = bytearray()

            # Flush content
            with handle_os_exceptions():
                self._flush(buffer, start, end)
212334
def flush():
    """"""
    try:
        sys.stdout.flush()
        sys.stderr.flush()
    except (AttributeError, ValueError, IOError):
        pass  # unsupported
    try:
        libc.fflush(None)
    except (AttributeError, ValueError, IOError):
        pass
264544
def _flush(self, buffer):
        
        with _handle_oss_error():
            self._bucket.put_object(key=self._key, data=buffer.tobytes())
153725
public void flush() throws IOException {
		if (printWriter != null) {
			printWriter.flush();
		}

		if (gzipOutputStream != null) {
			gzipOutputStream.flush();
		}
	}
887142
private void flushBuffer()
            throws IOException
    {
        if (buffer.position() > 0) {
            buffer.flip();
            writeCompressed(buffer);
            buffer.clear();
        }
    }
1337794
def _flushBuffer(self, request):
        ''''''
        assert request is self.requestSession.request
        self.requestSession.writeData(self.buffer)
        self.buffer = []
843867
public void flush() throws IOException {
        checkForClosed();
        writeBufferToFile();
        if (_currentOffset > _offset) { // something to commit
            _nfsFile.commit(_offset, (int) (_currentOffset - _offset));
            _offset = _currentOffset;
        }
        super.flush();
    }
1319800
void flush(OutputStream out, String encoding)
         throws IOException
    {
        flush(new OutputStreamWriter(out,encoding));
    }
1301846
private void flushBuffer() throws IOException {
    if (this.dirty_) {
      if (this.diskPos_ != this.lo_) {
        super.seek(this.lo_);
      }
      int len = (int) (this.curr_ - this.lo_);
      super.write(this.buff_, 0, len);
      this.diskPos_ = this.curr_;
      this.dirty_ = false;
    }
  }
13315
private void flushOutput() throws IOException {
    outStream.flush();
    outWriter.completeLine();
    errStream.flush();
    errWriter.completeLine();
  }
399339
def flush(self):
        
        self.acquire()
        try:
            if self.outStream and hasattr(self.outStream, "flush"):
                self.outStream.flush()
            if self.errStream and hasattr(self.errStream, "flush"):
                self.errStream.flush()
        finally:
            self.release()