Package com.illumon.iris.db.util.file
Interface FileHandleFactory
- All Known Implementing Classes:
TrackedFileHandleFactory
public interface FileHandleFactory
Factory interface for producing
FileHandles.-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFileHandleFactory.FileToHandleFunctionstatic classFileHandleFactory.OpenOptionsHelper -
Method Summary
Modifier and Type Method Description FileHandlemakeHandle(File file, OpenOption... openOptions)Create a newFileHandlewith the specified set ofOpenOptions.static FileHandleFactory.FileToHandleFunctiontoReadOnlyHandleCreator(FileHandleFactory fileHandleFactory)static FileHandleFactory.FileToHandleFunctiontoReadWriteCreateHandleCreator(FileHandleFactory fileHandleFactory)static FileHandleFactory.FileToHandleFunctiontoWriteAppendCreateHandleCreator(FileHandleFactory fileHandleFactory)static FileHandleFactory.FileToHandleFunctiontoWriteTruncateCreateHandleCreator(FileHandleFactory fileHandleFactory)
-
Method Details
-
makeHandle
@NotNull FileHandle makeHandle(@NotNull File file, @NotNull OpenOption... openOptions) throws IOExceptionCreate a newFileHandlewith the specified set ofOpenOptions.- Parameters:
file- TheFileto openopenOptions- TheOpenOptions to use- Returns:
- The new file handle
- Throws:
IOException
-
toReadOnlyHandleCreator
static FileHandleFactory.FileToHandleFunction toReadOnlyHandleCreator(@NotNull FileHandleFactory fileHandleFactory) -
toReadWriteCreateHandleCreator
static FileHandleFactory.FileToHandleFunction toReadWriteCreateHandleCreator(@NotNull FileHandleFactory fileHandleFactory) -
toWriteAppendCreateHandleCreator
static FileHandleFactory.FileToHandleFunction toWriteAppendCreateHandleCreator(@NotNull FileHandleFactory fileHandleFactory) -
toWriteTruncateCreateHandleCreator
static FileHandleFactory.FileToHandleFunction toWriteTruncateCreateHandleCreator(@NotNull FileHandleFactory fileHandleFactory)
-