|
|
ibi Patterns .NET API
|
Implement NetricsFieldedReader for CSV files. More...
Public Member Functions |
|
| NetricsCSVReader (String file_name, String char_set_name) | |
| Create a reader for a Named CSV file. |
|
| NetricsCSVReader (StreamReader instream) | |
| Create CSV Reader from an already opened stream. |
|
| int | curLineNum () |
| Return the line number of the next line to be read. |
|
| String | curLine () |
| Return the text of the last line processed. |
|
| void | reset () |
| Reset the read back to the first record. |
|
| String[] | readRecord () |
| Read a single logical CSV record. |
|
| void | close () |
| Closes files opened by this object. |
|
| void | Dispose () |
| Clean up attached resources. |
|
| int | curLineNum () |
| Return the line/record number about to be read. |
|
| void | reset () |
| Start sequence over from the beginning. |
|
| void | close () |
| Close the input source releasing all resources. |
|
| String[] | readRecord () |
| Read the next record. |
|
Detailed Description
Implement NetricsFieldedReader for CSV files.
This is a simple CSV file reader that handles the same CSV format as the server side CSV reader.
- See also
- NetricsFieldedReader
Constructor & Destructor Documentation
◆ NetricsCSVReader() [1/2]
|
inline |
Create a reader for a Named CSV file.
This creates a CSV file reader for a CSV file specified by a file name and a character set encoding name.
- Parameters
-
file_name The path name of the CSV file. char_set_name The name of the character encoding for the file.
◆ NetricsCSVReader() [2/2]
|
inline |
Create CSV Reader from an already opened stream.
This creates a CSV Reader on the given input stream.
- Parameters
-
instream Stream CSV data is read from.
Member Function Documentation
◆ close()
|
inline |
Closes files opened by this object.
This closes and cleans up any files opened by this object.
Implements NetricsServerInterface.NetricsFieldedReader.
◆ Dispose()
|
inline |
Clean up attached resources.
Cleans up and resources owned by this object.
◆ readRecord()
|
inline |
Read a single logical CSV record.
This reads a CSV record, which could be more than one physical line in the file.
- Returns
- An array of strings representing the fields fo the CSV record. Returns null on EOF.
Implements NetricsServerInterface.NetricsFieldedReader.
◆ reset()
|
inline |
Reset the read back to the first record.
This resets reading of the file to the first record in the file so they can be read again. This can only be used if the file was opened by this object, if the CSV data is being read from a passed in stream this will throw an exception.
Implements NetricsServerInterface.NetricsFieldedReader.