Flushable

  • The Flushable interface is for destinations that need to flush buffered output to the underlying stream.

  • It has a single method flush() which forces any buffered data to be written out.

  • Classes like BufferedOutputStream, BufferedWriter, and many others implement this interface for efficient output handling.

  • flush() can throw an IOException if an error occurs during the write operation.

public interface Flushable
Known Indirect Subclasses

A Flushable is a destination of data that can be flushed. The flush method is invoked to write any buffered output to the underlying stream.

Public Method Summary

abstract void
flush()
Flushes this stream by writing any buffered output to the underlying stream.

Public Methods

public abstract void flush ()

Flushes this stream by writing any buffered output to the underlying stream.

Throws
IOException If an I/O error occurs