java.io

## Interface Closeable

- All Superinterfaces:
    AutoCloseable
  All Known Implementing Classes:
    BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter, ByteArrayInputStream, ByteArrayOutputStream, DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, FileReader, FileWriter, FilterInputStream, FilterOutputStream, FilterReader, FilterWriter, InputStream, InputStreamReader, LineNumberInputStream, LineNumberReader, ObjectInputStream, ObjectOutputStream, OutputStream, OutputStreamWriter, PrintStream, PrintWriter, PushbackInputStream, Reader, StringReader, StringWriter, Writer

      public interface Closeable
      extends AutoCloseable

  A `Closeable` is a source or destination of data that can be closed. The close method is invoked to release resources that the object is holding (such as open files).
  Since:
    1.5

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes this stream and releases any system resources associated with it.

- - ### Method Detail

    - #### close

          void close()
              throws IOException

      Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException` - if an I/O error occurs

Copyright © 2025 API Design. All Rights Reserved.