public class RawTableReader extends TableReader
accessor, dataObjectLocation| Constructor and Description |
|---|
RawTableReader(java.lang.Object table,
java.net.URL dataFile,
DataObjectLocation location,
boolean checkSize) |
RawTableReader(java.lang.Object table,
java.net.URL dataFile,
java.net.URL label,
DataObjectLocation location,
boolean readEntireFile)
Constructor.
|
RawTableReader(java.lang.Object table,
java.net.URL dataFile,
java.net.URL label,
DataObjectLocation location,
boolean readEntireFile,
boolean keepQuotationsFlag)
Constructor.
|
RawTableReader(java.lang.Object table,
java.net.URL dataFile,
java.net.URL label,
DataObjectLocation location,
boolean readEntireFile,
boolean keepQuotationsFlag,
java.io.RandomAccessFile raf,
java.io.InputStream inputStream)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
TableRecord |
getRecord(long index,
boolean keepQuotationsFlag)
Gets a record in the table.
|
TableRecord |
readNext()
Reads the next record in the table.
|
java.lang.String |
readNextFixedLine()
Previews the next fixed length line in the data file.
|
java.lang.String |
readNextLine()
Previews the next line in the data file.
|
FixedTableRecord |
toRecord(java.lang.String line,
long row)
Converts the given line to a record.
|
close, getAccessor, getAdapter, getCurrentRow, getDataObjectLocation, getFieldMap, getFields, getInputStream, getOffset, getRecord, getRecordSize, setCurrentRow, setCurrentRow, setDataObjectLocationpublic RawTableReader(java.lang.Object table,
java.net.URL dataFile,
java.net.URL label,
DataObjectLocation location,
boolean readEntireFile)
throws java.lang.Exception
table - The table object.dataFile - The data file.label - The label.location - The location of the table within the metadata definitionreadEntireFile - Set to 'true' to read in entire data file.java.lang.Exception - If table offset is null.public RawTableReader(java.lang.Object table,
java.net.URL dataFile,
java.net.URL label,
DataObjectLocation location,
boolean readEntireFile,
boolean keepQuotationsFlag)
throws java.lang.Exception
table - The table object.dataFile - The data file.label - The label.location - The location of the table within the metadata definitionreadEntireFile - Set to 'true' to read in entire data file.keepQuotationsFlag - Flag to optionally preserve the leading and trailing quotes.java.lang.Exception - If table offset is null.public RawTableReader(java.lang.Object table,
java.net.URL dataFile,
java.net.URL label,
DataObjectLocation location,
boolean readEntireFile,
boolean keepQuotationsFlag,
java.io.RandomAccessFile raf,
java.io.InputStream inputStream)
throws java.lang.Exception
table - The table object.dataFile - The data file.label - The label.location - The location of the table within the metadata definitionreadEntireFile - Set to 'true' to read in entire data file.keepQuotationsFlag - Flag to optionally preserve the leading and trailing quotes.fileChannel - file channel stream used for ByteWideFileAccessorinputStream - input stream of the file used for CSVReaderjava.lang.Exception - If table offset is null.public RawTableReader(java.lang.Object table,
java.net.URL dataFile,
DataObjectLocation location,
boolean checkSize)
throws InvalidTableException,
java.lang.Exception
InvalidTableExceptionjava.lang.Exceptionpublic java.lang.String readNextLine()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String readNextFixedLine()
throws java.io.IOException
java.io.IOExceptionpublic FixedTableRecord toRecord(java.lang.String line, long row)
line - The line to convert.row - The row number to set.public TableRecord readNext() throws java.io.IOException
readNext in class TableReaderjava.io.IOExceptionpublic TableRecord getRecord(long index, boolean keepQuotationsFlag) throws java.lang.IllegalArgumentException, java.io.IOException
getRecord in class TableReaderThe - index of the record.java.lang.IllegalArgumentException - if index is greater than the record numberjava.io.IOExceptionCopyright © 2023 Planetary Data System. All rights reserved.