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 java.lang.Object implements TableAdapter 
- 
- 
Constructor SummaryConstructors Constructor Description TableBinaryAdapter(TableBinary table)Creates a new instance for a particular table.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDescriptiongetField(int index)Returns the field at a given index.intgetFieldCount()Gets the number of fields in each record.chargetFieldDelimiter()Gets the field delimiter.FieldDescription[]getFields()Gets the definitions of fields from the table.java.util.List<FieldDescription>getFieldsList()Gets the definitions of fields from the table.intgetMaximumRecordLength()Gets the maximum length of each record.longgetOffset()Gets the offset into the data file where the table starts.longgetRecordCount()Gets the number of records in the table.java.lang.StringgetRecordDelimiter()Gets the record delimiter.intgetRecordLength()Gets the length of each record.
 
- 
- 
- 
Constructor Detail- 
TableBinaryAdapterpublic TableBinaryAdapter(TableBinary table) throws InvalidTableException Creates a new instance for a particular table.- Parameters:
- table- the table
- Throws:
- InvalidTableException
 
 
- 
 - 
Method Detail- 
getRecordCountpublic long getRecordCount() Description copied from interface:TableAdapterGets the number of records in the table.- Specified by:
- getRecordCountin interface- TableAdapter
- Returns:
- the number of records
 
 - 
getFieldCountpublic int getFieldCount() Description copied from interface:TableAdapterGets the number of fields in each record. TODO This should really be a long value, but this would require a ton of changes in the code so we will attack this problem when we get there. Data with num fields larger than max int should not happen- Specified by:
- getFieldCountin interface- TableAdapter
- Returns:
- the number of fields
 
 - 
getFieldpublic FieldDescription getField(int index) 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 interface- TableAdapter
- Parameters:
- index- the field index
- Returns:
- the field description
 
 - 
getFieldspublic FieldDescription[] 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 fields will have been expanded to their instances.- Specified by:
- getFieldsin interface- TableAdapter
- Returns:
- an array of field descriptions
 
 - 
getFieldsListpublic java.util.List<FieldDescription> getFieldsList() 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 fields will have been expanded to their instances.- Specified by:
- getFieldsListin interface- TableAdapter
- Returns:
- an array of field descriptions
 
 - 
getOffsetpublic long getOffset() Description copied from interface:TableAdapterGets the offset into the data file where the table starts.- Specified by:
- getOffsetin interface- TableAdapter
- Returns:
- the table offset
 
 - 
getRecordLengthpublic int getRecordLength() Description copied from interface:TableAdapterGets the length of each record. For delimited tables the record length is not defined, so -1 is returned. TODO This should really be a long value, but this would require a ton of changes in the code we will attack this problem when we get there. Data with record length larger than max int should not happen- Specified by:
- getRecordLengthin interface- TableAdapter
- Returns:
- the record length, or zero for a delimited table
 
 - 
getRecordDelimiterpublic java.lang.String getRecordDelimiter() Description copied from interface:TableAdapterGets the record delimiter. For binary tables the record delimiter is not defined, so null is returned.- Specified by:
- getRecordDelimiterin interface- TableAdapter
- Returns:
- the record delimiter, or null for binary table
 
 - 
getFieldDelimiterpublic char getFieldDelimiter() Description copied from interface:TableAdapterGets the field delimiter. For non-delimited tables, will return 0.- Specified by:
- getFieldDelimiterin interface- TableAdapter
- Returns:
- the field delimiter, or 0 for non-delimited table
 
 - 
getMaximumRecordLengthpublic int getMaximumRecordLength() Description copied from interface:TableAdapterGets the maximum length of each record. Optional only for delimited tables. Will return -1 if not available.- Specified by:
- getMaximumRecordLengthin interface- TableAdapter
- Returns:
- the maximum record lengths
 
 
- 
 
-