public class DatasetReader extends DataReader
Obtains records from those cached in a Dataset.
  • Constructor Details

    • DatasetReader

      public DatasetReader(Dataset dataset, long offset, int count)
      Creates a reader for up to count records starting at the 0-based offset (0 or less reads to the end). Reads wait for records the dataset is still loading.
    • DatasetReader

      public DatasetReader(Dataset dataset)
      Creates a reader for all the dataset's records; reads wait for records it is still loading.
  • Method Details

    • getDataset

      public Dataset getDataset()
    • getOffset

      public long getOffset()
      Returns the 0-based index of the first record to read.
    • getCount

      public int getCount()
      Returns the maximum number of records to read; 0 or less means no limit.
    • readImpl

      protected Record readImpl() throws Throwable
      Description copied from class: DataReader
      Overridden by subclasses to read the next record from this DataReader. The default implementation of DataReader.read() now insures that this method will not be called again after it returns a null.

      If no record is available, null will be returned.

      Contract for subclasses (see also docs/authoring/DataReader.md):

      Specified by:
      readImpl in class DataReader
      Throws:
      Throwable