org.das2.qds.util.AsciiParser.RecordParser


fieldCount

fieldCount( ) → int

indicate the number of fields this RecordParser is expecting on each line.

Returns:

the field count.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


fieldCount

fieldCount( String line ) → int

return the number of fields in this line. All records will have this number of fields. This is used for discovery and to configure the parser.

Parameters

line - the line from the file, to attempt parsing.

Returns:

the number of fields found.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


readNextRecord

readNextRecord( java.io.BufferedReader reader ) → String

return the next record in a String, or null of no more records exist.

Parameters

reader - a BufferedReader

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


splitRecord

splitRecord( String line, String[] fields ) → boolean

attempts to extract fields from the record, returning true if the record could be split.

Parameters

line - the line from the file.
fields - array to store the fields. fieldCount() should be used to determine the length of the array.

Returns:

true if the line is a record that can be split into fields.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


tryParseRecord

tryParseRecord( String line, int irec, org.das2.qds.util.DataSetBuilder builder ) → boolean

returns true if the line appears to be a record. If it is a record, then the record is inserted into the builder.

Parameters

line - the line from the file.
irec - the record number
builder - the builder into which the data is inserted.

Returns:

true if the line appeared to be a record.

[search for examples] [view on GitHub] [view on old javadoc] [view source]