Class RowIterator

java.lang.Object
com.univocity.parsers.common.iterators.RowIterator
All Implemented Interfaces:
IterableResult<String[],ParsingContext>, Iterable<String[]>

public abstract class RowIterator extends Object
An iterator of String[]. Created when AbstractParser.iterate(File) (and its overloaded counterparts) is called
Author:
Univocity Software Pty Ltd - dev@univocity.com
  • Field Details

  • Constructor Details

  • Method Details

    • nextResult

      protected final String[] nextResult()
      Returns the next record (either a String[] or a Record)
      Returns:
      the next record if available.
    • getContext

      public final ParsingContext getContext()
      Description copied from interface: IterableResult
      Returns the current parsing Context, if available
      Specified by:
      getContext in interface IterableResult<T,ParsingContext>
      Returns:
      the contextual object with information about an ongoing parsing process
    • beginParsing

      protected abstract void beginParsing()
      This method is called whenever the iterator is starting to iterate over the results. an example implementation of this is:
           
           &#064;Override
           public void beginParsing(){
               parser.beginParsing(input);
           }
       

      This is to allow for different input types such as Reader, File, or InputStream without large code reuse.
    • iterator

      public final ResultIterator<String[],ParsingContext> iterator()
      Specified by:
      iterator in interface Iterable<T>
      Specified by:
      iterator in interface IterableResult<T,ParsingContext>