- Index
- »
- util
- »
- CsvInStream
type
CsvInStream
src
@Js
class CsvInStream : InStream
CsvInStream is used to read delimiter-separated values as specified by RFC 4180. Format details:
- rows are delimited by a newline
- cells are separated by
delimiter
char - cells may be quoted with
"
character - quoted cells may contain the delimiter
- quoted cells may contain newlines (always normalized to "\n")
- quoted cells must escape
"
with""
- the
trim
flag trims leading/trailing whitespace from non-quoted cells (note that RFC 4180 specifies that whitespace is significant)
Also see CsvOutStream
.
constructors
make |
Wrap the underlying input stream. |
---|
fields
delimiter |
Delimiter character; defaults to comma. |
---|---|
trim |
Configures whether unqualified whitespace around a cell is automatically trimmed. |
methods
eachRow |
Iterate through all the lines parsing each one into delimited-separated strings and calling the given callback functions. |
---|---|
readAllRows |
Read the entire table of rows into memory. |
readRow |
Read the next line as a row of delimiter-separated strings. |