public class TableReader extends Object
TableReader
class defines methods for reading table records.Constructor and Description |
---|
TableReader(Object table,
File dataFile)
Constructs a
TableReader instance for reading records from a
data file associated with a table object. |
Modifier and Type | Method and Description |
---|---|
FieldDescription[] |
getFields()
Gets the field descriptions for fields in the table.
|
TableRecord |
getRecord(int index)
Gets access to the table record given the index.
|
TableRecord |
readNext()
Reads the next record from the data file.
|
public TableReader(Object table, File dataFile) throws Exception
TableReader
instance for reading records from a
data file associated with a table object.table
- a table objectdataFile
- an input data fileNullPointerException
- if table offset is nullException
public FieldDescription[] getFields()
public TableRecord readNext() throws IOException
IOException
public TableRecord getRecord(int index) throws IllegalArgumentException, IOException
index
- the record index (1-relative)TableRecord
IllegalArgumentException
- if index is greater than the record numberIOException
Copyright © 2010–2016 Planetary Data System. All rights reserved.