Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
  
  
    
    
    
    Flushable
    interface Flushable
    
    
      
        
          | Known Direct Subclasses
              
              
                
                  
                    | Console | Methods to access the character-based console device, if any, associated with the current Java virtual machine. |  
                    | Formatter | An interpreter for printf-style format strings. |  
                    | OutputStream | This abstract class is the superclass of all classes representing an output stream of bytes. |  
                    | Writer | Abstract class for writing to character streams. |  | 
      
    
    
      
        
          | Known Indirect Subclasses
              AssetFileDescriptor.AutoCloseOutputStream, Base64OutputStream , BufferedOutputStream , BufferedWriter , ByteArrayOutputStream , CharArrayWriter , CheckedOutputStream , CipherOutputStream , DataOutputStream , DeflaterOutputStream , DigestOutputStream , FileOutputStream , and 15 others. 
                
                  
                    | AssetFileDescriptor.AutoCloseOutputStream | An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling android. |  
                    | Base64OutputStream | An OutputStream that does Base64 encoding on the data written to it, writing the resulting data to another OutputStream. |  
                    | 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. |  
                    | 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 Fileor to aFileDescriptor. |  
                    | FileWriter | Writes text to character files using a default buffer size. |  
                    | FilterOutputStream | This class is the superclass of all classes that filter output streams. |  
                    | FilterWriter | Abstract class for writing filtered character streams. |  
                    | 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 JarOutputStreamclass 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. |  
                    | OutputStreamWriter | An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified . |  
                    | ParcelFileDescriptor.AutoCloseOutputStream | An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling android. |  
                    | PipedOutputStream | A piped output stream can be connected to a piped input stream to create a communications pipe. |  
                    | PipedWriter | Piped character-output streams. |  
                    | PrintStream | A PrintStreamadds 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. |  
                    | 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.
    Summary
    
      
        
          | Public methods | 
        
          | abstract Unit | Flushes this stream by writing any buffered output to the underlying stream. | 
      
    
    Public methods
    
      flush
      
      abstract fun flush(): Unit
      Flushes this stream by writing any buffered output to the underlying stream.
      
        
          
            | Exceptions | 
          
            | java.io.IOException | If an I/O error occurs | 
        
      
     
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.
  
  
  
    
      [null,null,["Last updated 2025-02-10 UTC."],[],[]]