CsvReader

Description

sealed class Tinman.Core.Formatting.CsvReader

Derived from

Disposable abstract
IPathInfo

Reads a text stream of comma-separated values (CSV).

Public / Constructors

Csv​Reader


public constructor CsvReader → (2)

reader in : ITextStream own

[not-null]
The text to parse.

format in : CsvFormat

The CSV format.

Creates a new instance of CsvReader.

File


[OwnerReturn]
public static method File → (3)

path in : Path

[not-null]
Path to file to parse.

format in : CsvFormat

The CSV format.

encoding opt : CharacterEncoding = null

The character encoding to use. If null, CharacterEncodingSimple.ISO_8859_1 will be used.

returns → CsvReader

The CsvReader object.

Creates a new instance of CsvReader.

IOException

If an I/O error has occurred.

Text


[OwnerReturn]
public static method Text → (2)

text in : string

[not-null]
The text to parse.

format in : CsvFormat

The CSV format.

returns → CsvReader

The CsvReader object.

Creates a new instance of CsvReader.

Public / Methods

Read​Header


public method ReadHeader → ()

Reads the next row and uses the column values as headings.

IOException

If an I/O error has occurred.

Read​Line


public method ReadLine → ()

returns → string [ ]

The column values or null if there is no more data.

Reads the next row.

IOException

If an I/O error has occurred.

Public / Attributes

Header


public attribute Header → (get)

value : IVectorConst<string>

[not-null]
The header columns. Will be empty until ReadHeader is called.

The header columns.