Class InventoryBatchReader

java.lang.Object
gov.nasa.pds.registry.common.meta.InventoryBatchReader
All Implemented Interfaces:
Closeable, AutoCloseable

public class InventoryBatchReader extends Object implements Closeable
A class to read records from collection inventory files in batches.
Author:
karpenko
  • Constructor Details

    • InventoryBatchReader

      public InventoryBatchReader(Reader reader, RefType refType)
      Constructor
      Parameters:
      reader - Usually a file reader.
      refType - Primary or secondary product reference
  • Method Details

    • close

      public void close()
      Close the reader (input file).
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • readNextBatch

      public int readNextBatch(int batchSize, ProdRefsBatch batch) throws Exception
      Read next batch from a collection inventory file.
      Parameters:
      batchSize - Batch size
      batch - Store lid and lidvid references in this object (This is the output parameter)
      Returns:
      number of records read.
      Throws:
      Exception - Generic exception