Flushable
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
BufferedOutputStream,
BufferedWriter,
ByteArrayOutputStream,
CharArrayWriter,
CheckedOutputStream,
CipherOutputStream,
Console,
DataOutputStream,
DeflaterOutputStream,
DigestOutputStream,
FileOutputStream,
FileWriter,
FilterOutputStream,
FilterWriter,
Formatter,
and
13 others.
BufferedOutputStream |
The class implements a buffered output stream. |
BufferedWriter |
Writes text to a character-output stream, buffering characters so as to
provide for the efficient writing of single characters, arrays, and strings. |
ByteArrayOutputStream |
This class implements an output stream in which the data is
written into a byte array. |
CharArrayWriter |
This class implements a character buffer that can be used as an Writer. |
CheckedOutputStream |
An output stream that also maintains a checksum of the data being
written. |
CipherOutputStream |
A CipherOutputStream is composed of an OutputStream and a Cipher so
that write() methods first process the data before writing them out
to the underlying OutputStream. |
Console |
Provides access to the console, if available. |
DataOutputStream |
A data output stream lets an application write primitive Java data
types to an output stream in a portable way. |
DeflaterOutputStream |
This class implements an output stream filter for compressing data in
the "deflate" compression format. |
DigestOutputStream |
A transparent stream that updates the associated message digest using
the bits going through the stream. |
FileOutputStream |
A file output stream is an output stream for writing data to a
File or to a FileDescriptor . |
FileWriter |
Convenience class for writing character files. |
FilterOutputStream |
This class is the superclass of all classes that filter output
streams. |
FilterWriter |
Abstract class for writing filtered character streams. |
Formatter |
An interpreter for printf-style format strings. |
GZIPOutputStream |
This class implements a stream filter for writing compressed data in
the GZIP file format. |
InflaterOutputStream |
Implements an output stream filter for uncompressing data stored in the
"deflate" compression format. |
JarOutputStream |
The JarOutputStream class is used to write the contents
of a JAR file to any output stream. |
ObjectOutputStream |
An ObjectOutputStream writes primitive data types and graphs of Java objects
to an OutputStream. |
OutputStream |
This abstract class is the superclass of all classes representing
an output stream of bytes. |
OutputStreamWriter |
A class for turning a character stream into a byte stream. |
PipedOutputStream |
Places information on a communications pipe. |
PipedWriter |
Piped character-output streams. |
PrintStream |
A PrintStream adds functionality to another output stream,
namely the ability to print representations of various data values
conveniently. |
PrintWriter |
Prints formatted representations of objects to a text-output stream. |
StringWriter |
A character stream that collects its output in a string buffer, which can
then be used to construct a string. |
Writer |
Abstract class for writing to character streams. |
ZipOutputStream |
This class implements an output stream filter for writing files in the
ZIP file format. |
|
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["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."]]],["The `Flushable` interface designates a data destination capable of flushing. Its core action is defined by the `flush()` method. This method forces any buffered data to be written to the underlying stream, ensuring that all output is committed. If an I/O error occurs during this process, an `IOException` is thrown. Several classes implement the interface such as `BufferedOutputStream`, `BufferedWriter`, and `FileOutputStream`, among others.\n"]]