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 ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic final class -
Method Summary
Modifier and TypeMethodDescriptionmakeHandle(File file, OpenOption... openOptions) Create a newFileHandlewith the specified set ofOpenOptions.toReadOnlyHandleCreator(FileHandleFactory fileHandleFactory) toReadWriteCreateHandleCreator(FileHandleFactory fileHandleFactory) toWriteAppendCreateHandleCreator(FileHandleFactory fileHandleFactory) toWriteTruncateCreateHandleCreator(FileHandleFactory fileHandleFactory)
-
Method Details
-
makeHandle
@NotNull FileHandle makeHandle(@NotNull File file, @NotNull OpenOption... openOptions) throws IOException Create 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)
-