Package gov.nasa.pds.objectAccess.table
Class TableBinaryAdapter
java.lang.Object
gov.nasa.pds.objectAccess.table.TableBinaryAdapter
- All Implemented Interfaces:
TableAdapter
public class TableBinaryAdapter extends Object implements TableAdapter
-
Constructor Summary
Constructors Constructor Description TableBinaryAdapter(TableBinary table)Creates a new instance for a particular table. -
Method Summary
Modifier and Type Method Description FieldDescriptiongetField(int index)Returns the field at a given index.intgetFieldCount()Gets the number of fields in each record.FieldDescription[]getFields()Gets the definitions of fields from the table.longgetOffset()Gets the offset into the data file where the table starts.intgetRecordCount()Gets the number of records in the table.intgetRecordLength()Gets the length of each record.
-
Constructor Details
-
TableBinaryAdapter
Creates a new instance for a particular table.- Parameters:
table- the table- Throws:
InvalidTableException
-
-
Method Details
-
getRecordCount
public int getRecordCount()Description copied from interface:TableAdapterGets the number of records in the table.- Specified by:
getRecordCountin interfaceTableAdapter- Returns:
- the number of records
-
getFieldCount
public int getFieldCount()Description copied from interface:TableAdapterGets the number of fields in each record.- Specified by:
getFieldCountin interfaceTableAdapter- Returns:
- the number of fields
-
getField
Description copied from interface:TableAdapterReturns the field at a given index. This field will be a simple field or a bit field. All grouped fields will have been expanded to their instances.- Specified by:
getFieldin interfaceTableAdapter- Parameters:
index- the field index- Returns:
- the field description
-
getFields
Description copied from interface:TableAdapterGets the definitions of fields from the table. The fields will be a simple field or a bit field. All grouped fiels will have been expanded to their instances.- Specified by:
getFieldsin interfaceTableAdapter- Returns:
- an array of field descriptions
-
getOffset
public long getOffset()Description copied from interface:TableAdapterGets the offset into the data file where the table starts.- Specified by:
getOffsetin interfaceTableAdapter- Returns:
- the table offset
-
getRecordLength
public int getRecordLength()Description copied from interface:TableAdapterGets the length of each record. For delimited tables the record length is not defined, so zero is returned.- Specified by:
getRecordLengthin interfaceTableAdapter- Returns:
- the record length, or zero for a delimited table
-