Package java.io

Interface Closeable

    • Method Detail

      • close

        void close()
            throws IOException
        Closes the object and release any system resources it holds.

        Although only the first call has any effect, it is safe to call close multiple times on the same object. This is more lenient than the overridden AutoCloseable.close(), which may be called at most once.

        Specified by:
        close in interface AutoCloseable
        Throws:
        IOException