|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.pds.label.object.DataObject
gov.nasa.pds.label.object.TableObject
public class TableObject
Implements an object that represents a table in a PDS product. The table may be binary, character, or delimited.
Constructor Summary | |
---|---|
TableObject(File parentDir,
File fileObject,
Object tableObject,
long offset,
long size)
Creates a new instance of the table object. |
Method Summary | |
---|---|
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. |
Methods inherited from class gov.nasa.pds.label.object.DataObject |
---|
getBuffer, getDataFile, getInputStream, getOffset, getSize, setSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableObject(File parentDir, File fileObject, Object tableObject, long offset, long size) throws Exception
parentDir
- the parent directory for the table objectfileObject
- the file object describing the data filetableObject
- the table object describing the tableoffset
- the offset of the table object within the data filesize
- the size of the table object, in bytes
Exception
- if there is any error accessing the tableMethod Detail |
---|
public FieldDescription[] getFields()
public TableRecord readNext() throws IOException
IOException
- if there is an error reading from the data filepublic TableRecord getRecord(int index) throws IllegalArgumentException, IOException
index
- the record index (1-relative)
TableRecord
IllegalArgumentException
- if index is greater than the record number
IOException
- if there is an error reading from the data file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |