Interface Disposable

    • Method Detail

      • dispose

        void dispose()
        Invoked when all resources owned by the implementer can safely be released.

        Once disposed of the object should no longer be considered to be usable.

        Note the Disposable interface is compatible with try-with-resources which will automatically invoke this method.

      • close

        default void close()
        Default implementation invokes dispose(), it is not recommended that this be overridden.
        Specified by:
        close in interface AutoCloseable