Context interface with essential information about the output being produced.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ColumnMap | |
| pack-priv final int | |
| private String[] | |
| pack-priv final ParserOutput | |
| protected RecordFactory | |
| protected boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | columnsReordered()
Implements com. |
| public int | currentColumn()
Implements com. |
| public long | currentRecord()
Implements com. |
| public int | errorContentLength()
Implements com. If |
| public int[] | extractedFieldIndexes()
Implements com. |
| public String[] | headers()
Implements com. |
| public int | indexOf(String
the header whose position will be returned header)Implements com. |
| public int | indexOf(Enum<?>
the header whose position will be returned header)Implements com. |
| public boolean | isStopped()
Implements com. |
| public RecordMetaData | recordMetaData()
Implements com. |
| pack-priv void | |
| public String[] | selectedHeaders()
Implements com. |
| public void | |
| public Record | toRecord(String[]
the row to be converted into a row)com.Implements com. com.
|
| columnMap | back to summary |
|---|---|
| pack-priv final ColumnMap columnMap | |
| errorContentLength | back to summary |
|---|---|
| pack-priv final int errorContentLength | |
| headers | back to summary |
|---|---|
| private String[] headers | |
| output | back to summary |
|---|---|
| pack-priv final ParserOutput output | |
| recordFactory | back to summary |
|---|---|
| protected RecordFactory recordFactory | |
| stopped | back to summary |
|---|---|
| protected boolean stopped | |
| DefaultContext | back to summary |
|---|---|
| public DefaultContext(int errorContentLength) | |
| DefaultContext | back to summary |
|---|---|
| public DefaultContext(ParserOutput output, int errorContentLength) | |
| columnsReordered | back to summary |
|---|---|
| public boolean columnsReordered() Implements com. Doc from com. Indicates whether selected fields are being reordered. If columns are reordered, each parsed record will contain values only for the selected fields, as specified by
| |
| currentColumn | back to summary |
|---|---|
| public int currentColumn() Implements com. Doc from com. Returns the column index of the record being processed.
| |
| currentRecord | back to summary |
|---|---|
| public long currentRecord() Implements com. Doc from com. Returns the index of the last valid record parsed from the input
| |
| errorContentLength | back to summary |
|---|---|
| public int errorContentLength() Implements com. Doc from com. Returns the length limit of parsed contents appearing in exception messages when an error occurs If defaults to
| |
| extractedFieldIndexes | back to summary |
|---|---|
| public int[] extractedFieldIndexes() Implements com. Doc from com. Returns the indexes of each field extracted from the input when fields are selected. The indexes are relative to their original position in the input. For example, if the input has the fields "A, B, C, D", and the selected fields are "A, D", then the extracted field indexes will return [0, 3] If no fields were selected, then this method will return null. This means all fields are being parsed.
| |
| headers | back to summary |
|---|---|
| public String[] headers() Implements com. Doc from com. Returns the file headers that identify each parsed record. | |
| indexOf | back to summary |
|---|---|
| public int indexOf(String header) Implements com. Doc from com. Returns the position of a header (0 based). | |
| indexOf | back to summary |
|---|---|
| public int indexOf(Enum<?> header) Implements com. Doc from com. Returns the position of a header (0 based). | |
| isStopped | back to summary |
|---|---|
| public boolean isStopped() Implements com. Doc from com. Identifies whether the parser is running.
| |
| recordMetaData | back to summary |
|---|---|
| public RecordMetaData recordMetaData() Implements com. Doc from com. Returns the metadata information associated with records produced by the current parsing process.
| |
| reset | back to summary |
|---|---|
| pack-priv void reset() | |
| selectedHeaders | back to summary |
|---|---|
| public String[] selectedHeaders() Implements com. Doc from com. Returns the sequence of headers that have been selected. If no selection has been made, all available headers
will be returned, producing the same output as a call to method
| |
| stop | back to summary |
|---|---|
| public void stop() Implements com. Doc from com. Stops the parsing process. Any open resources in use by the parser are closed
automatically unless
| |
| toRecord | back to summary |
|---|---|
| public Record toRecord(String[] row) Implements com. Doc from com. Converts the given parsed row to a
| |