Flush OutputStream or PrintWriter.

@throws IOException ex
516331
@Override
	public void flushBuffer() throws IOException {

		//PrintWriter.flush() does not throw exception
		if (this.printWriter != null) {
			this.printWriter.flush();
		}

		if (this.gzipOutputStream != null) {
			this.gzipOutputStream.flush();
		}

		// doing this might leads to response already committed exception
		// when the PageInfo has not yet built but the buffer already flushed
		// Happens in Weblogic when a servlet forward to a JSP page and the forward
		// method trigger a flush before it forwarded to the JSP
		// disableFlushBuffer for that purpose is 'true' by default
		if (!disableFlushBuffer) {
			super.flushBuffer();
		}
	}
1364321
def write(self, output):
        
        self._stream.write(output)

        if self._auto_flush:
            self._stream.flush()
719943
public void write()
        throws IOException
    {
        BufferedWriter writer = new BufferedWriter( new OutputStreamWriter( m_outputStream ) );
        for( String line : m_content )
        {
            writer.write( line );
            writer.newLine();
        }
        writer.flush();
        writer.close();
    }
1178503
public void flush()
  {
    Writer out = this.out;
    if (out == null)
      return;

    try {
      out.flush();
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    }
  }
66573
private void flushOutput() throws IOException {
        if (decoderOut.position() > 0) {
            writer.write(decoderOut.array(), 0, decoderOut.position());
            decoderOut.rewind();
        }
    }
63319
@Override
    public void flush() {

        PrintWriter out = null;
        try {
            try {
                out = new PrintWriter(Utils.createFile(dir, file), "UTF-8");
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            String contents = getBuffer().toString();
            out.write(processor.apply(contents));
        } finally {
            closeQuietly(out);
        }
    }
419758
public void flush() throws IOException {
        if(closed) {
            throw new IllegalStateException("Can't flush packets on a closed stream!");
        }

        // Write in one go
        OggPage[] pages = buffer.toArray(new OggPage[buffer.size()]); 
        file.writePages(pages);

        // Get ready for next time!
        buffer.clear();
    }
1053386
public FileAppender flush() {
		try(PrintWriter pw = writer.getPrintWriter(true)){
			for (String str : list) {
				pw.print(str);
				if (isNewLineMode) {
					pw.println();
				}
			}
		}
		list.clear();
		return this;
	}
1159127
public static void print(Object o) throws IOException {
		OutputStreamWriter w=new OutputStreamWriter(System.out,"UTF-8");
		print(o, w, true);
		w.flush();
	}
231616
@Override
    public synchronized void flush() throws IOException {
        ensureOpen();
        if (decodedBuf.position() > 0) {
            decodedBuf.flip();
            String contents = decodedBuf.toString();
            String filtered = contentFilter.filter(contents);
            out.write(filtered.getBytes(charset));
            decodedBuf.clear();
        }
        out.flush();
    }
232970
protected void flushBuffer() throws IOException {
		if (capacity == 0) {
			ostream.write(buffer);
			capacity = BITS_IN_BYTE;
			buffer = 0;
			len++;
		}
	}
550553
@Override
    public void flushBuffer() throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Flushing buffers: " + this);
        }
        if (null != this.outWriter) {
            this.outWriter.flush();
        } else {
            this.outStream.flush();
        }
    }
67256
@Override
    public void flush() throws IOException {
        checkClosed();
        
        if (bs.isDirty()) {
            bs.write();
        }
        
        for (int i = 0; i < bs.getNrFats(); i++) {
            fat.writeCopy(bs.getFatOffset(i));
        }
        
        rootDir.flush();
        
        if (fsiSector != null) {
            fsiSector.setFreeClusterCount(fat.getFreeClusterCount());
            fsiSector.setLastAllocatedCluster(fat.getLastAllocatedCluster());
            fsiSector.write();
        }
    }
1222007
public List<String> flushStdout() throws IOException {
		List<String> result = new ArrayList<String>();
		while(stdout.ready()) {
			result.add(stdout.readLine());
		}
		return result;
	}
684437
public void writeOut(Writer out) throws IOException {
	    if (writer == null) {
	        out.write(strBuffer.toString()); // PK33136
	        // Flush not called as the writer passed could be a BodyContent and
	        // it doesn't allow to flush.
	    }
    }
847710
public void flush() throws IOException {
        checkMutable();
        long startTime = System.currentTimeMillis();
        channel.force(true);
        long elapsedTime = System.currentTimeMillis() - startTime;
        LogFlushStats.recordFlushRequest(elapsedTime);
        logger.debug("flush time " + elapsedTime);
        setHighWaterMark.set(getSizeInBytes());
        logger.debug("flush high water mark:" + highWaterMark());
    }
910393
public void flush() throws IOException {
        final ByteOutput output = this.output;
        final int pos = this.position;
        if (pos > 0) {
            output.write(CHUNK_START);
            writeInt(pos);
            final byte[] buffer = this.buffer;
            output.write(buffer, 0, pos);
        }
        this.position = 0;
    }