Package org.nuxeo.ecm.core.api
Class CloseableFile
- java.lang.Object
-
- org.nuxeo.ecm.core.api.CloseableFile
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CloseableFile extends Object implements Closeable
A wrapper for aFile, which must be closed when done with it in order to release resources.- Since:
- 7.2
-
-
Field Summary
Fields Modifier and Type Field Description booleandeleteOnCloseFilefile
-
Constructor Summary
Constructors Constructor Description CloseableFile(File file, boolean deleteOnClose)
-
-
-
Field Detail
-
file
public final File file
-
deleteOnClose
public final boolean deleteOnClose
-
-
Constructor Detail
-
CloseableFile
public CloseableFile(File file, boolean deleteOnClose)
-
-
Method Detail
-
getFile
public File getFile()
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-