dxFeed .Net API  5.13.0
dxFeed .Net API library intended to provide market data access for DX clients
Private Attributes | Static Private Attributes
com.dxfeed.io.CSVReader Class Reference

Reads data from the stream using Comma-Separated Values (CSV) format. See RFC 4180 for CSV format specification. More...

Inheritance diagram for com.dxfeed.io.CSVReader:
[legend]
Collaboration diagram for com.dxfeed.io.CSVReader:
[legend]

Private Attributes

StreamReader reader
 
char separator
 
char quote
 
StringCache strings = new StringCache()
 
char [] buf = new char[8192]
 
int position
 
int limit
 
bool eol
 
bool eof
 
int lineNumber = 1
 
int recordNumber = 1
 

Static Private Attributes

static readonly char CR = '\r'
 
static readonly char LF = '\n'
 

Detailed Description

Reads data from the stream using Comma-Separated Values (CSV) format. See RFC 4180 for CSV format specification.

This reader supports records with arbitrary (variable) number of fields, multiline fields, custom separator and quote characters. It accepts CR, LF and CRLF sequence as record separators.

This reader provides its own buffering but does not perform decoding. The correct way to efficiently read CSV file with UTF-8 encoding is as follows:

CSVReader reader = new CSVReader(new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8));
string[] header = reader.readRecord();
List<string[]> records = reader.readAll();
reader.close();

Field Documentation

◆ buf

char [] com.dxfeed.io.CSVReader.buf = new char[8192]
private

◆ CR

readonly char com.dxfeed.io.CSVReader.CR = '\r'
staticprivate

◆ eof

bool com.dxfeed.io.CSVReader.eof
private

◆ eol

bool com.dxfeed.io.CSVReader.eol
private

◆ LF

readonly char com.dxfeed.io.CSVReader.LF = '\n'
staticprivate

◆ limit

int com.dxfeed.io.CSVReader.limit
private

◆ lineNumber

int com.dxfeed.io.CSVReader.lineNumber = 1
private

◆ position

int com.dxfeed.io.CSVReader.position
private

◆ quote

char com.dxfeed.io.CSVReader.quote
private

◆ reader

StreamReader com.dxfeed.io.CSVReader.reader
private

◆ recordNumber

int com.dxfeed.io.CSVReader.recordNumber = 1
private

◆ separator

char com.dxfeed.io.CSVReader.separator
private

◆ strings

StringCache com.dxfeed.io.CSVReader.strings = new StringCache()
private

The documentation for this class was generated from the following file: