Emmanuel Bourg
00d0def695
Replaced the unicode escaping code from the parser with a class implementing java.io.Reader
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1298001 13f79535-47bb-0310-9956-ffa450edef68
2012-03-07 15:58:12 +00:00
Emmanuel Bourg
60709c2040
Added a predefined format for MySQL (SANDBOX-410)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297944 13f79535-47bb-0310-9956-ffa450edef68
2012-03-07 11:29:32 +00:00
Emmanuel Bourg
4f3ef66ce3
Removed the constructors of CSVFormat from the public API, as well as the DISABLED constant which becomes useless because the special characters are disabled by default in the predefined formats
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297930 13f79535-47bb-0310-9956-ffa450edef68
2012-03-07 11:02:52 +00:00
Emmanuel Bourg
516b82b471
Made all public methods in CharBuffer and ExtendedBufferedReader package private
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297719 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 21:00:44 +00:00
Emmanuel Bourg
9dd3dda09f
Removed the package private method CSVParser.nextToken()
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297431 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 11:23:04 +00:00
Emmanuel Bourg
6cf4a36a4e
Added a note in the Javadoc explaining the issue with the value separator for the Excel format (SANDBOX-263)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297429 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 11:20:36 +00:00
Emmanuel Bourg
4ea25c050e
Removed the writer package (SANDBOX-269), fixed width fields are out of the scope of [csv]
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297383 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 08:46:26 +00:00
Emmanuel Bourg
e7434e5cb5
Changed CSVPrinter to print to any Appendable and optimized the internals to avoid string copies
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297309 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 00:48:34 +00:00
Emmanuel Bourg
e80b8112a7
Fixed the NullPointerException on null values in CSVPrinter and print an empty value instead (SANDBOX-209)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297306 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 00:09:51 +00:00
Emmanuel Bourg
fafacd179d
Made CSVPrinter.print(char[], int, int, boolean) private
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297138 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 17:30:44 +00:00
Emmanuel Bourg
323b7aedae
Varargs for CSVPrinter.println()
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297136 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 17:28:56 +00:00
Emmanuel Bourg
f6c0433b65
Added a constructor with a String to CSVParser and removed CSVUtils
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297135 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 17:27:28 +00:00
Emmanuel Bourg
1a35541867
Added a convenient format() method in CSVFormat replacing CSVUtils.printLine()
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297091 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 15:42:03 +00:00
Emmanuel Bourg
a53c76b43a
Removed unused methods from CharBuffer
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297078 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 15:01:41 +00:00
Emmanuel Bourg
fa5dca3be1
Test cases for CSVPrinter.printComment()
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297075 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 14:42:14 +00:00
Emmanuel Bourg
7bd9d1d970
Updated the Javadoc
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297043 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 13:08:19 +00:00
Emmanuel Bourg
312f5b033e
Added a convenient parse() method to CSVFormat
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1297022 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 12:12:04 +00:00
Emmanuel Bourg
c7f90f93c6
Changed the default line separator to \r\n to comply with RFC 4180 (SANDBOX-163)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1201115 13f79535-47bb-0310-9956-ffa450edef68
2011-11-12 00:16:56 +00:00
Emmanuel Bourg
70337bef8f
Changed the return type of CSVFormat.clone()
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1201060 13f79535-47bb-0310-9956-ffa450edef68
2011-11-11 21:34:36 +00:00
Emmanuel Bourg
2598862d94
Fixed the immutability of the delimiter in CSVFormat
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1200283 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 11:58:02 +00:00
David Brosius
9acd5cd4d3
bad logic, should use || rather than &&, but instanceof covers the null case anyway
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1200112 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 03:37:47 +00:00
Emmanuel Bourg
2417ea6c4e
Changed the signature of CSVUtils.printLine() to use varargs
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1200065 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 00:41:43 +00:00
Emmanuel Bourg
9cb66ca7fb
Reduced the constants in CSVFormat for disabling the features to only one
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1200061 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 00:26:09 +00:00
Emmanuel Bourg
4a48180eb6
Removed the references to Jakarta and fixed some links
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1200041 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:39:17 +00:00
Emmanuel Bourg
045dbbbe4a
Made CSVParser iterable to simplify the iteration over the records
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1200024 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:04:13 +00:00
Emmanuel Bourg
a7bd28c496
Renamed CSVParser.getAllValues() to getRecords()
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199997 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 22:04:01 +00:00
Emmanuel Bourg
16bfec07ff
Turned the token types into an Enum
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199872 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 17:11:22 +00:00
Emmanuel Bourg
cbcfb72912
Upgrading to Java 5
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199845 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 16:58:32 +00:00
Emmanuel Bourg
cb99634ab3
Renamed CSVStrategy to CSVFormat
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199842 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 16:54:09 +00:00
Emmanuel Bourg
42476f4b08
CSVStrategy is now immutable (SANDBOX-279)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199827 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 16:21:23 +00:00
Emmanuel Bourg
fc4ccb426e
Removed CSVParser.nextValue() (SANDBOX-220)
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199780 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 14:54:05 +00:00
Emmanuel Bourg
d90fa381c4
Made the protected fields in CSVPrinter private
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199775 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 14:42:58 +00:00
Emmanuel Bourg
be3cb017eb
Removed the deprecated constructors
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199772 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 14:31:40 +00:00
Emmanuel Bourg
cacb79dab9
Changed the visibility of the Token types and the protected methods to package private
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199769 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 14:26:09 +00:00
Emmanuel Bourg
43b777b982
Made the static fields final in CSVStrategy
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199768 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 14:16:22 +00:00
Emmanuel Bourg
e6e80741d8
Removed an unused constructor in ExtendedBufferedReader
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199761 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 13:56:16 +00:00
Emmanuel Bourg
5f1aa66714
CharBuffer is now package private
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199749 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 13:40:16 +00:00
Emmanuel Bourg
165a5dcaf4
Optimized imports
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199697 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 11:17:33 +00:00
Emmanuel Bourg
c9aeca5c39
Moved the directories to match the Maven layout
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1199691 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 10:38:54 +00:00
Stephen Colebourne
76cab04936
Ignore Eclipse files
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1148829 13f79535-47bb-0310-9956-ffa450edef68
2011-07-20 16:14:54 +00:00
Jacopo Cappellato
1166ca605b
No functional changes are contained in this commit: reformatted Java code to fix several formatting inconsistencies (between classes and within the same class); sorry for the big commit, but I have preferred to isolate into one commit all the formatting changes.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065950 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 08:46:00 +00:00
Jacopo Cappellato
fe5bd51f8a
Applied patch contributed by Henri Yandell in SANDBOX-219: "ExtendedBufferedReader does too much"
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065948 13f79535-47bb-0310-9956-ffa450edef68
2011-02-01 08:18:59 +00:00
Jacopo Cappellato
c6bdecabd8
Fixes for typos in comments and javadoc.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065549 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 10:47:56 +00:00
Jacopo Cappellato
58149e21ad
Resolved warning caused by the usage of a deprecated constructor.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065526 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 08:50:59 +00:00
Jacopo Cappellato
339c2a689c
Test cases for \r and \n line endings (SANDBOX-218).
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065525 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 08:49:23 +00:00
Jacopo Cappellato
822e653a0e
Test cases for the scenarios described in SANDBOX-161:
...
* Double quotes (") should be escaped using two double quotes (""), rather than a backslash (\").
* Embedded line breaks are allowed and don't need to be escaped... just enclose the field in double quotes.
* Because backslashes are not used to escape double quotes or line breaks, the backslashes themselves do not need to be escaped.
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065519 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 08:34:21 +00:00
Jacopo Cappellato
6b422c82bd
Fix for issue reported in SANDBOX-218: CSV reader doesn't handle older Mac line endings (\r) that are also used by recent versions of Excel for Mac.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065496 13f79535-47bb-0310-9956-ffa450edef68
2011-01-31 07:10:57 +00:00
Jacopo Cappellato
cfcca024a5
Added javadoc documentation for some missing parameters for a CSVStrategy constructor.
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1065347 13f79535-47bb-0310-9956-ffa450edef68
2011-01-30 18:45:26 +00:00
Joerg Schaible
b1edd537c7
CSVWriter.writeValue does not use value delimiter (SANDBOX-243).
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1037647 13f79535-47bb-0310-9956-ffa450edef68
2010-11-22 09:47:55 +00:00
Joerg Schaible
6eddaf8b0c
Apply configurable row delimiter by Dmitry Drozdov (SANDBOX-329).
...
git-svn-id: https://svn.apache.org/repos/asf/commons/sandbox/csv/trunk@1003046 13f79535-47bb-0310-9956-ffa450edef68
2010-09-30 12:48:59 +00:00