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 Details

    • getTransform

      EarthTransform getTransform()
      Gets the earth transform for this list.
    • size

      int size()
      Gets the number of readers in this list.
    • getStartDate

      Date getStartDate(int index)
      Gets the starting date for the specified reader.
      Parameters:
      index - the reader index to query.
      Returns:
      the starting date for the specified reader.
    • getVariable

      DataVariable getVariable(int index, String varName) throws IOException
      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

      EarthDataReader getReader(int index) throws IOException
      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

      int getClosestIndex(Date date)
      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.