Package ucar.unidata.io.zarr
Class VirtualRandomAccessFile
- java.lang.Object
-
- ucar.unidata.io.zarr.VirtualRandomAccessFile
-
- All Implemented Interfaces:
RandomAccessDirectoryItem
public class VirtualRandomAccessFile extends Object implements RandomAccessDirectoryItem
A wrapper for a RandomAccessFile that allows lazy loading
-
-
Constructor Summary
Constructors Constructor Description VirtualRandomAccessFile(String location, long startIndex, long length, long lastModified, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLastModified()StringgetLocation()ucar.unidata.io.RandomAccessFilegetOrOpenRaf()ucar.unidata.io.RandomAccessFilegetRaf()longlength()longstartIndex()
-
-
-
Constructor Detail
-
VirtualRandomAccessFile
public VirtualRandomAccessFile(String location, long startIndex, long length, long lastModified, int bufferSize)
-
-
Method Detail
-
getLocation
public String getLocation()
- Specified by:
getLocationin interfaceRandomAccessDirectoryItem- Returns:
- location of directory item
-
startIndex
public long startIndex()
- Specified by:
startIndexin interfaceRandomAccessDirectoryItem- Returns:
- start index of item relative to directory
-
length
public long length()
- Specified by:
lengthin interfaceRandomAccessDirectoryItem- Returns:
- size of directory item
-
getLastModified
public long getLastModified()
- Specified by:
getLastModifiedin interfaceRandomAccessDirectoryItem- Returns:
- last modified time (in ms) of directory item
-
getRaf
public ucar.unidata.io.RandomAccessFile getRaf()
- Specified by:
getRafin interfaceRandomAccessDirectoryItem- Returns:
- RandomAccessFile for directory item or null if unopened
-
getOrOpenRaf
public ucar.unidata.io.RandomAccessFile getOrOpenRaf() throws IOException- Specified by:
getOrOpenRafin interfaceRandomAccessDirectoryItem- Returns:
- RandomAccessFile for directory item
- Throws:
IOException
-
-