CsvReader (ORC Tools 1.6.6 API)
Date: 2021-01-13

org.apache.orc.tools.convert

## Class CsvReader

- java.lang.Object
- - org.apache.orc.tools.convert.CsvReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, RecordReader

      public class CsvReader
      extends Object
      implements RecordReader

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CsvReader(Reader reader, FSDataInputStream input, long size, TypeDescription schema, char separatorChar, char quoteChar, char escapeChar, int headerLines, String nullString, String timestampFormat)` Create a CSV reader

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `float` | `getProgress()`
    `long` | `getRowNumber()`
    `boolean` | `nextBatch(VectorizedRowBatch batch)`
    `void` | `seekToRow(long rowCount)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CsvReader

          public CsvReader(Reader reader,
                           FSDataInputStream input,
                           long size,
                           TypeDescription schema,
                           char separatorChar,
                           char quoteChar,
                           char escapeChar,
                           int headerLines,
                           String nullString,
                           String timestampFormat)

      Create a CSV reader
      Parameters:
        `reader` - the stream to read from
        `input` - the underlying file that is only used for getting the position within the file
        `size` - the number of bytes in the underlying stream
        `schema` - the schema to read into
        `separatorChar` - the character between fields
        `quoteChar` - the quote character
        `escapeChar` - the escape character
        `headerLines` - the number of header lines
        `nullString` - the string that is translated to null
        `timestampFormat` - the timestamp format string

  - ### Method Detail

    - #### nextBatch

          public boolean nextBatch(VectorizedRowBatch batch)
                            throws IOException

      Specified by:
        `nextBatch` in interface `RecordReader`
      Throws:
        `IOException`

    - #### getRowNumber

          public long getRowNumber()
                            throws IOException

      Specified by:
        `getRowNumber` in interface `RecordReader`
      Throws:
        `IOException`

    - #### getProgress

          public float getProgress()
                            throws IOException

      Specified by:
        `getProgress` in interface `RecordReader`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in interface `RecordReader`
      Throws:
        `IOException`

    - #### seekToRow

          public void seekToRow(long rowCount)
                         throws IOException

      Specified by:
        `seekToRow` in interface `RecordReader`
      Throws:
        `IOException`

Copyright © 2013–2021 The Apache Software Foundation. All rights reserved.