Class StreamTableReader

java.lang.Object
com.illumon.iris.db.tables.dataimport.StreamTableReader
All Implemented Interfaces:
TableReader

public class StreamTableReader extends Object implements TableReader
A "stream" table reader that consumes from a ByteBuffer.
  • Constructor Details

    • StreamTableReader

      public StreamTableReader(@NotNull TableDefinition tableDefinition)
  • Method Details

    • readTable

      public QueryTable readTable(long size)
    • getGetter

      public RowGetter getGetter(String name)
      Description copied from interface: TableReader
      Return a raw RowGetter for the column with the given name. RowGetter.get() will return Object.
      Specified by:
      getGetter in interface TableReader
      Parameters:
      name - the column name
      Returns:
      a RowGetter
    • getGetter

      public <T> RowGetter<T> getGetter(String name, Class<T> tClass)
      Description copied from interface: TableReader
      Return a typed RowGetter for the column with the given name. RowGetter.get() will return type tClass.
      Specified by:
      getGetter in interface TableReader
      Parameters:
      name - the column name
      Returns:
      a RowGetter of type tClass
    • readRow

      public boolean readRow()
      Description copied from interface: TableReader
      Read a row from the source, expecting that all entries will be Rows. If a record entry is encountered, an IllegalStateException will be thrown.
      Specified by:
      readRow in interface TableReader
      Returns:
      true if successful, false if EOF or an error is encountered.
    • close

      public void close()
      Description copied from interface: TableReader
      Close the input source for this TableReader.
      Specified by:
      close in interface TableReader
    • getColumnNames

      public String[] getColumnNames()
      Description copied from interface: TableReader
      Get an array of all known column names. These can be used to determine valid column names for use in TableReader.getGetter(String).
      Specified by:
      getColumnNames in interface TableReader
      Returns:
      a new array of all known column names.
    • getColumnType

      public SupportedType getColumnType(String columnName)
      Description copied from interface: TableReader
      Get the SupportedType of the named column.
      Specified by:
      getColumnType in interface TableReader
      Parameters:
      columnName - the name of the column
      Returns:
      the SupportedType value for the named column
    • getFlagGetter

      public RowGetter<Row.Flags> getFlagGetter()
      Each row is independent.
      Specified by:
      getFlagGetter in interface TableReader
      Returns:
      a getter that returns the flags for each row.
    • setBuffer

      public void setBuffer(ByteBuffer currentBuffer)
    • getApplicationVersion

      public int getApplicationVersion()
      Description copied from interface: TableReader
      Get the application version associated with the file being read by this TableReader.
      Specified by:
      getApplicationVersion in interface TableReader
      Returns:
      the file's application version