Class AbstractDataFile
java.lang.Object
org.episteme.core.io.AbstractDataFile
- All Implemented Interfaces:
AutoCloseable, DataFile
- Direct Known Subclasses:
FITSFile
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this file and releases any system resources associated with it.Returns the underlying byte channel for this file.getPath()Returns the path to this file.protected booleanvoidopen(OpenOption... options) Opens this file with the specified options.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataFile
getFormatDescription
-
Constructor Details
-
AbstractDataFile
-
-
Method Details
-
getPath
-
open
Description copied from interface:DataFileOpens this file with the specified options.- Specified by:
openin interfaceDataFile- Parameters:
options- the options specifying how the file is opened- Throws:
IOException- if an I/O error occurs
-
isChannelOpen
protected boolean isChannelOpen() -
getChannel
Description copied from interface:DataFileReturns the underlying byte channel for this file.This allows direct low-level access if needed, though usually standard read/write methods should be preferred.
- Specified by:
getChannelin interfaceDataFile- Returns:
- the byte channel, or
nullif not open.
-
close
Description copied from interface:DataFileCloses this file and releases any system resources associated with it.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceDataFile- Throws:
IOException- if an I/O error occurs
-