Package org.apache.trevni
Class ColumnFileReader
java.lang.Object
org.apache.trevni.ColumnFileReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
Reads data from a column file.
-
Constructor Summary
ConstructorDescriptionColumnFileReader
(File file) Construct reading from the named file.ColumnFileReader
(Input file) Construct reading from the provided input. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
long
Return the number of columns in this file.Return all columns' metadata.getColumnMetaData
(int number) Return a column's metadata.getColumnMetaData
(String name) Return a column's metadata.Return this file's metadata.getRoots()
Return root columns' metadata.long
Return the number of rows in this file.<T extends Comparable>
ColumnValues<T> getValues
(int column) Return an iterator over values in a column.<T extends Comparable>
ColumnValues<T> Return an iterator over values in the named column.
-
Constructor Details
-
ColumnFileReader
Construct reading from the named file.- Throws:
IOException
-
ColumnFileReader
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
Return this file's metadata. -
getColumnMetaData
Return all columns' metadata. -
getRoots
Return root columns' metadata. Roots are columns that have no parent. -
getColumnMetaData
Return a column's metadata. -
getColumnMetaData
Return a column's metadata. -
getValues
Return an iterator over values in the named column.- Throws:
IOException
-
getValues
Return an iterator over values in a column.- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-