Class ColumnFileReader

java.lang.Object
org.apache.trevni.ColumnFileReader
All Implemented Interfaces:
Closeable, AutoCloseable

public class ColumnFileReader extends Object implements Closeable
Reads data from a column file.
  • Constructor Details

    • ColumnFileReader

      public ColumnFileReader(File file) throws IOException
      Construct reading from the named file.
      Throws:
      IOException
    • ColumnFileReader

      public ColumnFileReader(Input file) throws IOException
      Construct reading from the provided input.
      Throws:
      IOException
  • Method Details

    • getRowCount

      public long getRowCount()
      Return the number of rows in this file.
    • getColumnCount

      public long getColumnCount()
      Return the number of columns in this file.
    • getMetaData

      public ColumnFileMetaData getMetaData()
      Return this file's metadata.
    • getColumnMetaData

      public ColumnMetaData[] getColumnMetaData()
      Return all columns' metadata.
    • getRoots

      public List<ColumnMetaData> getRoots()
      Return root columns' metadata. Roots are columns that have no parent.
    • getColumnMetaData

      public ColumnMetaData getColumnMetaData(int number)
      Return a column's metadata.
    • getColumnMetaData

      public ColumnMetaData getColumnMetaData(String name)
      Return a column's metadata.
    • getValues

      public <T extends Comparable> ColumnValues<T> getValues(String columnName) throws IOException
      Return an iterator over values in the named column.
      Throws:
      IOException
    • getValues

      public <T extends Comparable> ColumnValues<T> getValues(int column) throws IOException
      Return an iterator over values in a column.
      Throws:
      IOException
    • close

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