Skip to content

Commit 2b5f84e

Browse files
committed
Document how to create CSVParsers via CSVFormat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1523213 13f79535-47bb-0310-9956-ffa450edef68
1 parent 7982e22 commit 2b5f84e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/java/org/apache/commons/csv/CSVParser.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@
5454
* </p>
5555
* <p>
5656
* Alternatively parsers can also be created by passing a {@link Reader} directly to the sole constructor.
57+
*
58+
* For those who like fluent APIs, parsers can be created using {@link CSVFormat#parse(java.io.Reader)} as a shortcut:
5759
* </p>
60+
* <pre>
61+
* for(CSVRecord record : CSVFormat.EXCEL.parse(in)) {
62+
* ...
63+
* }
64+
* </pre>
5865
*
5966
* <h4>Parsing record wise</h4>
6067
* <p>

0 commit comments

Comments
 (0)