java.lang.Object
com.aoapps.tempfiles.TempFile
- All Implemented Interfaces:
Closeable,AutoCloseable
A temporary file that is deleted when
closed or when its
associated TempFileContext is closed.
Thread-safe with fine-grained locking.
-
Method Summary
-
Method Details
-
getFile
Gets the temporary file.- Throws:
IllegalStateException- when already closed
-
close
Closes the temporary file, de-registering from delete on exit and deleting the underlying file.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
