virtual class util::CsvInStream

sys::Obj
  std::InStream
    std::ProxyInStream
      util::CsvInStream

@Js

CsvInStream is used to read delimiter-separated values as specified by RFC 4180. Format details:

Also see CsvOutStream.

delimiter

Int delimiter := 44

Delimiter character; defaults to comma.

eachRow

Void eachRow(Func<Void,List<Str>> f)

Iterate through all the lines parsing each one into delimited-separated strings and calling the given callback functions. The input stream is guaranteed to be closed upon completion.

make

new make(InStream in)

Wrap the underlying input stream.

readAllRows

List<List<Str>> readAllRows()

Read the entire table of rows into memory. The input stream is guaranteed to be closed upon completion.

readRow

virtual List<Str>? readRow()

Read the next line as a row of delimiter-separated strings. Return null if at end of stream.

trim

Bool trim := true

Configures whether unqualified whitespace around a cell is automatically trimmed. If a field is enclosed by quotes then it is never trimmed.