Class RowCursorCsv

java.lang.Object
app.babylon.table.io.RowCursorCsv
All Implemented Interfaces:
RowCursor, AutoCloseable

public final class RowCursorCsv extends Object implements RowCursor
Supplies rows from an open CSV input stream.

Instances are created by a configured RowSourceCsv and own the CSV reader resources for the lifetime of iteration.

  • Method Details

    • builder

      public static RowCursorCsv.Builder builder()
    • getHeaderStrategy

      public HeaderStrategy getHeaderStrategy()
    • getSeparator

      public char getSeparator()
    • isStripping

      public boolean isStripping()
    • getQuote

      public char getQuote()
    • getFixedWidths

      public int[] getFixedWidths()
    • getCharset

      public Charset getCharset()
    • isAutoDetectEncoding

      public boolean isAutoDetectEncoding()
    • columns

      public ColumnDefinition[] columns()
      Description copied from interface: RowCursor
      Returns the source-side column definitions exposed by this cursor.

      A non-null type here is not just metadata. It can be used by downstream row consumers to choose a more direct builder from the start, bypassing intermediate String materialization when the source type already has an efficient slice-based parser.

      That is most useful for primitive numerics and for special object types whose direct parser is genuinely better than first building a string dictionary.

      Specified by:
      columns in interface RowCursor
      Returns:
      the source column definitions in source order
    • next

      public boolean next()
      Specified by:
      next in interface RowCursor
    • current

      public Row current()
      Specified by:
      current in interface RowCursor
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface RowCursor
      Throws:
      IOException