Interface DirectoryHolder
-
- All Superinterfaces:
AutoCloseable,Closeable
public interface DirectoryHolder extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Release any resource currently held by theDirectoryHolder, including (but not limiting to) the directory itself.Directoryget()voidstart()Allocate internal resources (filesystem directories, ...) as necessary, along with the directory itself.
-
-
-
Method Detail
-
start
void start() throws IOExceptionAllocate internal resources (filesystem directories, ...) as necessary, along with the directory itself.After this method has been called,
get()can be safely called.- Throws:
IOException- If an error occurs while creating resources.RuntimeException- If an error occurs while creating resources.
-
close
void close() throws IOExceptionRelease any resource currently held by theDirectoryHolder, including (but not limiting to) the directory itself.After this method has been called, the result of calling any other method on the same instance is undefined.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- If an error occurs while releasing resources.RuntimeException- If an error occurs while releasing resources.
-
get
Directory get()
- Returns:
- The directory held by this
DirectoryHolder.
-
-