Package noaa.coastwatch.io
Interface ReaderList
- All Known Implementing Classes:
AbstractReaderList
,OpendapReaderList
public interface ReaderList
The
ReaderList
interface is designed to group together
a set of related EarthDataReader
instances with the same earth transform and allow them to be
accessible with less I/O overhead than if they were each opened
separately.- Since:
- 3.2.1
- Author:
- Peter Hollemans
-
Method Summary
Modifier and TypeMethodDescriptionint
getClosestIndex
(Date date) Get the index of the reader closest in start date to the specified date.getReader
(int index) Gets the specified earth data reader.getStartDate
(int index) Gets the starting date for the specified reader.Gets the earth transform for this list.getVariable
(int index, String varName) Gets a variable from the specified reader.int
size()
Gets the number of readers in this list.
-
Method Details
-
getTransform
EarthTransform getTransform()Gets the earth transform for this list. -
size
int size()Gets the number of readers in this list. -
getStartDate
Gets the starting date for the specified reader.- Parameters:
index
- the reader index to query.- Returns:
- the starting date for the specified reader.
-
getVariable
Gets a variable from the specified reader.- Parameters:
index
- the reader index to query.varName
- the variable name to retrieve.- Returns:
- the data variable from the reader.
- Throws:
IOException
- if an error occurred accessing the variable.
-
getReader
Gets the specified earth data reader. This method is probably I/O intensive and should only be used when necessary.- Parameters:
index
- the reader index to return.- Returns:
- the reader at the specified index.
- Throws:
IOException
- if an error occurred accessing the reader.
-
getClosestIndex
Get the index of the reader closest in start date to the specified date.- Parameters:
date
- the date to get the closest reader for.- Returns:
- the reader index or -1 if none are found.
-