# Flushable

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/java/io/Flushable#pubmethods)  

# Flushable

`
public


interface
Flushable
`  
`


`

|-------------------|
| java.io.Flushable |

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known indirect subclasses [AssetFileDescriptor.AutoCloseOutputStream](https://developer.android.com/reference/android/content/res/AssetFileDescriptor.AutoCloseOutputStream),[Base64OutputStream](https://developer.android.com/reference/android/util/Base64OutputStream),[BufferedOutputStream](https://developer.android.com/reference/java/io/BufferedOutputStream),[BufferedWriter](https://developer.android.com/reference/java/io/BufferedWriter),[ByteArrayOutputStream](https://developer.android.com/reference/java/io/ByteArrayOutputStream),[CharArrayWriter](https://developer.android.com/reference/java/io/CharArrayWriter),[CheckedOutputStream](https://developer.android.com/reference/java/util/zip/CheckedOutputStream),[CipherOutputStream](https://developer.android.com/reference/javax/crypto/CipherOutputStream),[Console](https://developer.android.com/reference/java/io/Console),[DataOutputStream](https://developer.android.com/reference/java/io/DataOutputStream),[DeflaterOutputStream](https://developer.android.com/reference/java/util/zip/DeflaterOutputStream),[DigestOutputStream](https://developer.android.com/reference/java/security/DigestOutputStream),[FileOutputStream](https://developer.android.com/reference/java/io/FileOutputStream),[FileWriter](https://developer.android.com/reference/java/io/FileWriter),[FilterOutputStream](https://developer.android.com/reference/java/io/FilterOutputStream), and 16 others. |----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AssetFileDescriptor.AutoCloseOutputStream](https://developer.android.com/reference/android/content/res/AssetFileDescriptor.AutoCloseOutputStream) | An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling[ParcelFileDescriptor.close()](https://developer.android.com/reference/android/os/ParcelFileDescriptor#close())for you when the stream is closed. | | [Base64OutputStream](https://developer.android.com/reference/android/util/Base64OutputStream)                                                      | An OutputStream that does Base64 encoding on the data written to it, writing the resulting data to another OutputStream.                                                                                                                   | | [BufferedOutputStream](https://developer.android.com/reference/java/io/BufferedOutputStream)                                                       | The class implements a buffered output stream.                                                                                                                                                                                             | | [BufferedWriter](https://developer.android.com/reference/java/io/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](https://developer.android.com/reference/java/io/ByteArrayOutputStream)                                                     | This class implements an output stream in which the data is written into a byte array.                                                                                                                                                     | | [CharArrayWriter](https://developer.android.com/reference/java/io/CharArrayWriter)                                                                 | This class implements a character buffer that can be used as an Writer.                                                                                                                                                                    | | [CheckedOutputStream](https://developer.android.com/reference/java/util/zip/CheckedOutputStream)                                                   | An output stream that also maintains a checksum of the data being written.                                                                                                                                                                 | | [CipherOutputStream](https://developer.android.com/reference/javax/crypto/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](https://developer.android.com/reference/java/io/Console)                                                                                 | Methods to access the character-based console device, if any, associated with the current Java virtual machine.                                                                                                                            | | [DataOutputStream](https://developer.android.com/reference/java/io/DataOutputStream)                                                               | A data output stream lets an application write primitive Java data types to an output stream in a portable way.                                                                                                                            | | [DeflaterOutputStream](https://developer.android.com/reference/java/util/zip/DeflaterOutputStream)                                                 | This class implements an output stream filter for compressing data in the "deflate" compression format.                                                                                                                                    | | [DigestOutputStream](https://developer.android.com/reference/java/security/DigestOutputStream)                                                     | A transparent stream that updates the associated message digest using the bits going through the stream.                                                                                                                                   | | [FileOutputStream](https://developer.android.com/reference/java/io/FileOutputStream)                                                               | A file output stream is an output stream for writing data to a`File`or to a`FileDescriptor`.                                                                                                                                               | | [FileWriter](https://developer.android.com/reference/java/io/FileWriter)                                                                           | Writes text to character files using a default buffer size.                                                                                                                                                                                | | [FilterOutputStream](https://developer.android.com/reference/java/io/FilterOutputStream)                                                           | This class is the superclass of all classes that filter output streams.                                                                                                                                                                    | | [FilterWriter](https://developer.android.com/reference/java/io/FilterWriter)                                                                       | Abstract class for writing filtered character streams.                                                                                                                                                                                     | | [Formatter](https://developer.android.com/reference/java/util/Formatter)                                                                           | An interpreter for printf-style format strings.                                                                                                                                                                                            | | [GZIPOutputStream](https://developer.android.com/reference/java/util/zip/GZIPOutputStream)                                                         | This class implements a stream filter for writing compressed data in the GZIP file format.                                                                                                                                                 | | [InflaterOutputStream](https://developer.android.com/reference/java/util/zip/InflaterOutputStream)                                                 | Implements an output stream filter for uncompressing data stored in the "deflate" compression format.                                                                                                                                      | | [JarOutputStream](https://developer.android.com/reference/java/util/jar/JarOutputStream)                                                           | The`JarOutputStream`class is used to write the contents of a JAR file to any output stream.                                                                                                                                                | | [ObjectOutputStream](https://developer.android.com/reference/java/io/ObjectOutputStream)                                                           | An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.                                                                                                                                           | | [OutputStream](https://developer.android.com/reference/java/io/OutputStream)                                                                       | This abstract class is the superclass of all classes representing an output stream of bytes.                                                                                                                                               | | [OutputStreamWriter](https://developer.android.com/reference/java/io/OutputStreamWriter)                                                           | An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified[charset](https://developer.android.com/reference/java/nio/charset/Charset).                    | | [ParcelFileDescriptor.AutoCloseOutputStream](https://developer.android.com/reference/android/os/ParcelFileDescriptor.AutoCloseOutputStream)        | An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling[ParcelFileDescriptor.close()](https://developer.android.com/reference/android/os/ParcelFileDescriptor#close())for you when the stream is closed. | | [PipedOutputStream](https://developer.android.com/reference/java/io/PipedOutputStream)                                                             | A piped output stream can be connected to a piped input stream to create a communications pipe.                                                                                                                                            | | [PipedWriter](https://developer.android.com/reference/java/io/PipedWriter)                                                                         | Piped character-output streams.                                                                                                                                                                                                            | | [PrintStream](https://developer.android.com/reference/java/io/PrintStream)                                                                         | A`PrintStream`adds functionality to another output stream, namely the ability to print representations of various data values conveniently.                                                                                                | | [PrintWriter](https://developer.android.com/reference/java/io/PrintWriter)                                                                         | Prints formatted representations of objects to a text-output stream.                                                                                                                                                                       | | [StringWriter](https://developer.android.com/reference/java/io/StringWriter)                                                                       | A character stream that collects its output in a string buffer, which can then be used to construct a string.                                                                                                                              | | [Writer](https://developer.android.com/reference/java/io/Writer)                                                                                   | Abstract class for writing to character streams.                                                                                                                                                                                           | | [ZipOutputStream](https://developer.android.com/reference/java/util/zip/ZipOutputStream)                                                           | This class implements an output stream filter for writing files in the ZIP file format.                                                                                                                                                    | |

<br />

*** ** * ** ***

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.

## Summary

|                                                                                ### Public methods                                                                                 ||
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[flush](https://developer.android.com/reference/java/io/Flushable#flush())`() ` Flushes this stream by writing any buffered output to the underlying stream. |

## Public methods

### flush

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract void flush ()
```

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

<br />

|                                               Throws                                               ||
|----------------------------------------------------------------------------|------------------------|
| [IOException](https://developer.android.com/reference/java/io/IOException) | If an I/O error occurs |