You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/12/23 05:36:36 UTC
commons-csv git commit: [CSV-205]
Repository: commons-csv
Updated Branches:
refs/heads/master 9afec3ed3 -> f96adf26c
[CSV-205]
Add convenience API CSVFormat#printer() to print to System.out.
Project: http://git-wip-us.apache.org/repos/asf/commons-csv/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-csv/commit/f96adf26
Tree: http://git-wip-us.apache.org/repos/asf/commons-csv/tree/f96adf26
Diff: http://git-wip-us.apache.org/repos/asf/commons-csv/diff/f96adf26
Branch: refs/heads/master
Commit: f96adf26c182a9eabbca6aa70a9c77b4f07e5e26
Parents: 9afec3e
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Dec 22 21:36:33 2016 -0800
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Dec 22 21:36:33 2016 -0800
----------------------------------------------------------------------
src/changes/changes.xml | 1 +
src/main/java/org/apache/commons/csv/CSVFormat.java | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f96adf26/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e49265b..b91a71a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -48,6 +48,7 @@
<action issue="CSV-190" type="add" dev="ggregory" due-to="Gary Gregory">Add convenience API CSVFormat.print(File, Charset)</action>
<action issue="CSV-191" type="add" dev="ggregory" due-to="Gary Gregory">Add convenience API CSVFormat.print(Path, Charset)</action>
<action issue="CSV-192" type="add" dev="ggregory" due-to="Gary Gregory">Add convenience API CSVParser.parse(Path, Charset, CSVFormat)</action>
+ <action issue="CSV-205" type="add" dev="ggregory" due-to="Gary Gregory">Add convenience API CSVFormat#printer() to print to System.out</action>
</release>
<release version="1.4" date="2016-05-28" description="Feature and bug fix release">
<action issue="CSV-181" type="update" dev="ggregory" due-to="Gary Gregory">Make CSVPrinter.print(Object) GC-free.</action>
http://git-wip-us.apache.org/repos/asf/commons-csv/blob/f96adf26/src/main/java/org/apache/commons/csv/CSVFormat.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/csv/CSVFormat.java b/src/main/java/org/apache/commons/csv/CSVFormat.java
index 44801f9..79a0713 100644
--- a/src/main/java/org/apache/commons/csv/CSVFormat.java
+++ b/src/main/java/org/apache/commons/csv/CSVFormat.java
@@ -870,6 +870,22 @@ public final class CSVFormat implements Serializable {
}
/**
+ * Prints to the {@link System#out}.
+ *
+ * <p>
+ * See also {@link CSVPrinter}.
+ * </p>
+ *
+ * @return a printer to {@link System#out}.
+ * @throws IOException
+ * thrown if the optional header cannot be printed.
+ * @since 1.5
+ */
+ public CSVPrinter printer() throws IOException {
+ return new CSVPrinter(System.out, this);
+ }
+
+ /**
* Prints to the specified output.
*
* <p>