Skip to content
Diergo Easy CSV Streamable
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

DeCS: Diergo Easy CSV Streamable

This Java library supports parsing and generation of comma separated value (csv) data as defined in RFC 4180.

The format is a simple line based text format for table data. Many databases or spreadsheet software like MS-Excel can use this data as an interchange format. Each line is a row of the table, the column values are separated by a comma (or an other character). If the separator or quote character is part of a column value, the value has to be quoted.


The diergo.csv package contains a tool box to read and write CSV data using Java 8 Streams and functional interfaces. You can easily connect the functionaliy by using map(), filter() and collect() of a Stream. As there are no direct dependencies of the tools you can simply extend it for your needs by creating new lambdas or functional interfaces and inject them to mappings and filters:

  List<Map<String, String>> lines = Readers.asLines(new FileReader("input.csv", StandardCharsets.UTF_8))
      // CSV parser turns each line into a row
      // turn each line into a map, the first line is treated as header with column names
      // create a stream of rows with an initial header row containing the column names
      // CSV printer turns each row into one line
      .collect(Appendables.toAppendable(new FileWriter("output.csv", StandardCharsets.UTF_8), '\n'));

There are more ready to use helper functions to filter and map at Rows, Maps and Values. Handling of comments, headers and separators is configured using the builders for CSV parser and printer. For the release notes, have a look at the change log.

Dependency Download

To integrate the library in your project, use the following dependency:


  compile 'diergo:decs:3.1.1'



The library has no external dependencies except two optional ones:


This library is published under Apache License Version 2.0.

You can’t perform that action at this time.