Commit Graph

877 Commits

Author SHA1 Message Date
Benedikt Ritter a12573e717 Add headings for different topics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522825 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:22:33 +00:00
Benedikt Ritter 7ab4840ba4 Creation of CSVParser instances is now documented at the begining of the JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522824 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:14:22 +00:00
Benedikt Ritter e9ff3ef208 Document how to create CSVParser instances
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522823 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 09:07:41 +00:00
Benedikt Ritter ad956f348a Don't use yet another term for format
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522820 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:56:47 +00:00
Benedikt Ritter 196260e8fa Correct indentation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522819 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:52:18 +00:00
Benedikt Ritter e01400d2c6 TDF is also predefined
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522817 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:51:12 +00:00
Benedikt Ritter 20e6c4e617 Use correct return type in JavaDoc - a list is returned, not an array.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522814 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:43:25 +00:00
Benedikt Ritter 1299090016 mvn clean site will not create the jar for you
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522812 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:34:05 +00:00
Benedikt Ritter 46ce06d3ff We are really iterating over records here
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522811 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:29:49 +00:00
Benedikt Ritter 67155b3d52 Add reference to RFC 4180
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522810 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:23:26 +00:00
Benedikt Ritter 0a6f94b2a3 Add alternative abbreviation
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522809 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:14:54 +00:00
Benedikt Ritter 10b1110942 Always write 'CSV' in capital letters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1522807 13f79535-47bb-0310-9956-ffa450edef68
2013-09-13 08:09:32 +00:00
Benedikt Ritter c43e8fa5de Remove fallback logic for charset parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1519269 13f79535-47bb-0310-9956-ffa450edef68
2013-09-01 13:36:08 +00:00
Benedikt Ritter 724c88dbec Remove unnecessary generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1518974 13f79535-47bb-0310-9956-ffa450edef68
2013-08-30 14:10:49 +00:00
Benedikt Ritter 6c44286b6d Add missing license headers
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1518808 13f79535-47bb-0310-9956-ffa450edef68
2013-08-29 20:25:19 +00:00
Benedikt Ritter a2fef00ab8 Make methods that create parsers or printers fail early and provide an expressive error messages. Document new behavior in JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1518802 13f79535-47bb-0310-9956-ffa450edef68
2013-08-29 20:18:13 +00:00
Benedikt Ritter 33cf289907 Remove factory methods for creating CSVParsers for classpath resources
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1513994 13f79535-47bb-0310-9956-ffa450edef68
2013-08-14 18:07:13 +00:00
Benedikt Ritter 817561f4d7 Add test that documents behavior of multiple iterators over the same CSVParser.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1513228 13f79535-47bb-0310-9956-ffa450edef68
2013-08-12 19:23:16 +00:00
Benedikt Ritter 5a30b37043 Fix typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512650 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:46:28 +00:00
Benedikt Ritter 012146e476 Make checkstyle happy: Line was longer than 120 chars
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512626 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:08:57 +00:00
Benedikt Ritter e0b79fe691 Make checkstyle happy: Line was longer than 120 chars, file contained tabs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512625 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:07:15 +00:00
Benedikt Ritter 1e70eaaaf4 Make checkstyle happy: remove trailing whitespace
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512624 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:05:10 +00:00
Benedikt Ritter 5db1a2c110 Make checkstyle happy: remove trailing white spaces, break line that was longer than 120 chars.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512623 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 11:04:34 +00:00
Benedikt Ritter df7b7d39cc Remove redundant cast
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512622 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:58:42 +00:00
Benedikt Ritter 375b273ced No need for explicitly creating an array. Arrays.asList is a varargs method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512621 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:57:32 +00:00
Benedikt Ritter c75345870e Fix JavaDoc references
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512620 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:52:09 +00:00
Benedikt Ritter 6b27379c40 Fix JavaDoc references
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512619 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:51:43 +00:00
Benedikt Ritter 4213415b2c Don't make JavaDoc references from production code to test code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512618 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:49:30 +00:00
Benedikt Ritter 04a2e9ebe4 Remove unused method. It made no sense anyway, since Assert.assertArrayEquals is capable of comparing multi dimensional arrays.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512617 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:46:03 +00:00
Benedikt Ritter 8b74f0aaff Utils class is only used for internal testing, it can be package private. Also make it final since it should not be extended.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512615 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:41:27 +00:00
Benedikt Ritter 06630f4b4b Make members private, they are only needed in this test case
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512614 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:39:48 +00:00
Benedikt Ritter 9631efe688 Methods are no longer used in test code. Make them private.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512610 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:32:19 +00:00
Benedikt Ritter 15b4e3f539 Sort members alphabetically
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512606 13f79535-47bb-0310-9956-ffa450edef68
2013-08-10 10:30:48 +00:00
Benedikt Ritter 1756e67623 Simplify if statements
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512399 13f79535-47bb-0310-9956-ffa450edef68
2013-08-09 17:09:37 +00:00
Benedikt Ritter a223126567 No need to declare private method final
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1512398 13f79535-47bb-0310-9956-ffa450edef68
2013-08-09 17:06:48 +00:00
Gary D. Gregory 152d50c4f7 Remove type names from static factory APIs in org.apache.commons.csv.CSVParser.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511883 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 17:11:03 +00:00
Gary D. Gregory a36bbffdd3 Remove org.apache.commons.csv.CSVParser.parseString(String).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511868 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 16:52:00 +00:00
Gary D. Gregory 65f6f1dfe8 Package private classes are not prefixed with "CSV": CSVLexer -> Lexer.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511462 13f79535-47bb-0310-9956-ffa450edef68
2013-08-07 20:00:26 +00:00
Benedikt Ritter 643b628af4 Replace tabs with spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511428 13f79535-47bb-0310-9956-ffa450edef68
2013-08-07 18:25:44 +00:00
Gary D. Gregory 53f83b4f18 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511039 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 17:12:26 +00:00
Sebastian Bazley aede94a857 Make fields private
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511015 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 16:01:24 +00:00
Sebastian Bazley 7b168ebbbe Merge Lexer with CSVLexer
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511006 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 15:44:41 +00:00
Sebastian Bazley 7755640784 No longer wanted
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1511005 13f79535-47bb-0310-9956-ffa450edef68
2013-08-06 15:43:10 +00:00
Gary D. Gregory a064b97305 [CSV-42] Lots of possible changes: Make classes final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510761 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 21:45:01 +00:00
Gary D. Gregory 258387e3ce Use US English spelling of 'recognized'.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510664 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 19:10:04 +00:00
Gary D. Gregory ed72da2552 Remove extra semicolon.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510660 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 19:03:09 +00:00
Gary D. Gregory b042bd8522 Remove primitive APIs in CSVRecord.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1510455 13f79535-47bb-0310-9956-ffa450edef68
2013-08-05 12:43:23 +00:00
Sebastian Bazley 6208f0c9af Fix up TODOs
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509967 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:59:28 +00:00
Sebastian Bazley 3fd92ec4a4 Use NotEscaped where character has not been escaped
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509966 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:51:21 +00:00
Benedikt Ritter 575c88d8a2 Add some more tests that document escaping behavior
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509957 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:12:48 +00:00
Benedikt Ritter 3178725e98 Align test names to other tests of the same kind
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509956 13f79535-47bb-0310-9956-ffa450edef68
2013-08-03 11:01:36 +00:00
Gary D. Gregory 70485e44f2 Add CSVRecord#getInt(String) API and tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509450 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:57:46 +00:00
Gary D. Gregory 4bb75e3edb Add CSVRecord#getLong(String) API and tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509449 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:54:37 +00:00
Gary D. Gregory ac03c2eaa7 Simplify tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509446 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:51:10 +00:00
Gary D. Gregory 666350b94a Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509442 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:48:39 +00:00
Gary D. Gregory 50b7f79338 CSVRecord.get(String) throws IAE if the column is not mapped (does not exist). This is similar to what JDBC does in ResultSet. Add getBoolean(String) API and tests.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509431 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 21:11:10 +00:00
Benedikt Ritter 412d05d166 Better throw a NoSuchElementException if no more elements are available because parser has been closed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509395 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 19:41:10 +00:00
Gary D. Gregory 7e63096d47 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509368 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 18:24:37 +00:00
Sebastian Bazley 86d488407b Ensure Closeable is closed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509264 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:42:35 +00:00
Sebastian Bazley efdcb376e8 Don't split ternary expression over two lines
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509261 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:39:29 +00:00
Sebastian Bazley 4b57058ebb Remove doc for non-existent parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509260 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:38:17 +00:00
Sebastian Bazley 105f907767 CSV-78 Use Character instead of char for char fields except delimiter
Already done as part of CSV-99 etc.
Updated Javadoc to clarify that null can be used to disable settings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509239 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 14:02:20 +00:00
Sebastian Bazley cf764bc9ae Doc tweak
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509232 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 13:45:35 +00:00
Gary D. Gregory 1d767ad946 Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509231 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 13:43:17 +00:00
Gary D. Gregory f69ddb394a [CSV-99] Revert Builder implementation in CSVFormat. Update Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509216 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 13:05:25 +00:00
Gary D. Gregory fcc0d15c7b - Remove trailing spaces.
- Add missing final keywords.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509069 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 02:04:27 +00:00
Gary D. Gregory 316a51f520 - Add some real world CSV files.
- Add a record API to get column values using an Enum.
- Throw a better exception when a resource is not found in a class loader for the parser.
- Replace some tabs with spaces.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509068 13f79535-47bb-0310-9956-ffa450edef68
2013-08-01 02:03:33 +00:00
Gary D. Gregory 816c652997 Better example.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1509012 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 20:03:02 +00:00
Benedikt Ritter c0d91d205d Remove copy method. It is not needed since every withXxx() method returns a copy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508966 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 17:43:14 +00:00
Gary D. Gregory 55eff9dcfa Use ch instead of c as a character var name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508943 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:53:05 +00:00
Gary D. Gregory 7909a7c386 Fix boxing and unboxing warnings.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508940 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:51:20 +00:00
Gary D. Gregory 2b14b16d4b Fix NPE when format is null.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508938 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:48:54 +00:00
Gary D. Gregory a062477946 Use ch instead of c as a character var name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508937 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:46:05 +00:00
Gary D. Gregory 9599bfe743 Document empty block. Formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508936 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:43:33 +00:00
Gary D. Gregory e33dced746 Document empty block.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508935 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:42:36 +00:00
Gary D. Gregory 97d34575a1 Revert back to NOT skipping a record when withHeader is called with a non-empty array. Add skipHeaderRecord setting to CSVFormat and use when headers are initialized.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508933 13f79535-47bb-0310-9956-ffa450edef68
2013-07-31 15:39:57 +00:00
Gary D. Gregory e6759b8c10 Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508635 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 21:24:52 +00:00
Gary D. Gregory f881372d92 Validate that headers do not contain duplicates.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508618 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 20:44:15 +00:00
Gary D. Gregory 3320c53e27 Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508613 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 20:37:17 +00:00
Gary D. Gregory 1533facb19 When withHeader is set to any non-null value, the first record is the first <em>data</em> record, not the header record.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508612 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 20:36:12 +00:00
Gary D. Gregory 390800f288 Make org.apache.commons.csv.CSVFormat.getHeader() public and make it return a clone.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508585 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 19:32:40 +00:00
Gary D. Gregory 69997467d4 Refactor to only have minimal CSVParser constructors in favor of CSVParser factory methods for String, resource path, URL, and File. Update some tests to use the APIs.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508544 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 17:36:34 +00:00
Gary D. Gregory 61fdb7a03a Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508511 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 16:26:43 +00:00
Gary D. Gregory 21ed5b135c Better lvar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508510 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 16:25:30 +00:00
Gary D. Gregory f78b5a14ca Change CSVFormat#Iterable<CSVRecord> parse(final Reader in) to return a CSVParser, which is compatible since CSVParser implements Iterable<CSVRecord>. This allows a caller to end the parsing by calling CSVParser#close() or to use CSVParser in a Java 7 try-with-resources, without tracking a reader or input stream.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508509 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 16:22:07 +00:00
Gary D. Gregory 7af334d7d5 Allow a caller to close the parser before reading all records and free resources. The parser and lexer now implement java.io.Closeable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508475 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 14:50:42 +00:00
Gary D. Gregory ee7335a2fc [CSV-99] Revert Builder implementation in CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508472 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 14:44:48 +00:00
Gary D. Gregory 75f39a81a7 [CSV-99] Revert Builder implementation in CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1508470 13f79535-47bb-0310-9956-ffa450edef68
2013-07-30 14:42:32 +00:00
Benedikt Ritter 20721c5a3d Make sure an unmapped header returns null
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1498003 13f79535-47bb-0310-9956-ffa450edef68
2013-06-29 19:04:01 +00:00
Gary D. Gregory 1579c1786a Fix formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1496236 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 22:18:23 +00:00
Sebastian Bazley d045a45f57 Clarify (hopefully) the Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1496064 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 14:22:56 +00:00
Gary D. Gregory df4bd36e7b Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1496024 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 13:13:57 +00:00
Sebastian Bazley ad0acc17e1 Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495965 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 09:15:27 +00:00
Gary D. Gregory b460ef6200 Add contants for [CSV-51] Support Unicode line separators.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495914 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 03:27:03 +00:00
Gary D. Gregory d5cc0d8a7c Replace magic String with constant from Constants.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495912 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 03:17:29 +00:00
Gary D. Gregory 5a0894f9e0 [CSV-93] Allow the handling of NULL values. Use a single property 'nullString' for both input and output processing. No substitutions occur if null. For reading, nullString is used to convert field values to null. For writing, nullString is used to output the given string instead of the empty string.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495911 13f79535-47bb-0310-9956-ffa450edef68
2013-06-24 03:06:05 +00:00
Gary D. Gregory 530b038269 Fix possible NPE reported by FindBugs.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495269 13f79535-47bb-0310-9956-ffa450edef68
2013-06-21 01:49:03 +00:00
Gary D. Gregory 93a07b9b8f Better param name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495268 13f79535-47bb-0310-9956-ffa450edef68
2013-06-21 01:46:26 +00:00
Gary D. Gregory ab2e7eb504 - Add final modifier to method parameters.
- Add final modifier to local variables.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1495203 13f79535-47bb-0310-9956-ffa450edef68
2013-06-20 21:39:53 +00:00
Sebastian Bazley c6c762ad9d Checkstyle: put trailing || on previous line (indicates more to come)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1485805 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 18:21:32 +00:00
Sebastian Bazley e5d7b21456 Checkstyle: trailing spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1485799 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 18:17:23 +00:00
Sebastian Bazley 512e446d28 Add code and test for Quote.NONE
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1480499 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 23:54:22 +00:00
Sebastian Bazley bb3bb0d65b Test default Quote policy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1480498 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 23:43:14 +00:00
Sebastian Bazley 71c69df6dd CSV-98 Line number counting is confusing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479936 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 15:12:48 +00:00
Sebastian Bazley 5b2e5f809b Simplify code so delimiter only printed in one place
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479823 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 09:09:11 +00:00
Sebastian Bazley 978e5796e2 MOre tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479753 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 02:21:38 +00:00
Sebastian Bazley 0fabee5f24 Add some more tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479730 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:54:45 +00:00
Sebastian Bazley 02c1b35939 Document why original object is needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479721 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:29:45 +00:00
Sebastian Bazley c616a17650 Typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479719 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:24:07 +00:00
Sebastian Bazley e697318e68 Fix Javadoc to current behaviour
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479712 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 23:02:34 +00:00
Sebastian Bazley 4f61bd1aee Extract check for metaChar
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479706 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 22:38:23 +00:00
Sebastian Bazley 883511fa42 Javadoc fix
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1479701 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 22:18:21 +00:00
Benedikt Ritter e6ba150743 Use isDelimiter method instead of != check.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1478655 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 06:37:58 +00:00
Sebastian Bazley 2c61208262 CSV-58 Unescape handling needs rethinking
Fixed up most issues.
TODO should TAB, FF and BACKSPACE be un/escaped?

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1478621 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 01:10:34 +00:00
Sebastian Bazley e31980892c Bug in test case result
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1478619 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 01:01:20 +00:00
Gary D. Gregory 697a612a89 Remove unused import.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1469437 13f79535-47bb-0310-9956-ffa450edef68
2013-04-18 16:59:44 +00:00
Sebastian Bazley 6640e8597c Standardise on record rather than line; fix incorrect Javadoc comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1468827 13f79535-47bb-0310-9956-ffa450edef68
2013-04-17 10:31:57 +00:00
Sebastian Bazley 939a8a04eb Standardise on recordSeparator; fix incorrect Javadoc comments
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1468825 13f79535-47bb-0310-9956-ffa450edef68
2013-04-17 10:28:33 +00:00
Benedikt Ritter f16818b3ba Give tests a better name that expresses, what actually happens
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1467766 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 11:35:47 +00:00
Benedikt Ritter 04522fbf90 Change JavaDoc to match actual parameter name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1467666 13f79535-47bb-0310-9956-ffa450edef68
2013-04-13 17:55:16 +00:00
Benedikt Ritter 03fefe8c30 Add missing JavaDoc for parameter
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1467665 13f79535-47bb-0310-9956-ffa450edef68
2013-04-13 17:49:37 +00:00
Benedikt Ritter 7e9b381a6f Document expected result for ignored test
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466605 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 18:16:23 +00:00
Benedikt Ritter 16e12d2130 Change wrong input data of test. Test now fails because of CSV-58 and is therefore changed to be @Ignore.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466604 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 18:15:36 +00:00
Benedikt Ritter fd8433b711 Give test a better name and remove comment that is now no longer needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466601 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 18:05:31 +00:00
Benedikt Ritter 6c346b143a Give test a better name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466591 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 17:48:28 +00:00
Benedikt Ritter b05af3c049 Add a test that makes sure ignoreSurroundingWhitespaces works for the tab character
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466590 13f79535-47bb-0310-9956-ffa450edef68
2013-04-10 17:47:42 +00:00
Gary D. Gregory a7e4484db9 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1466223 13f79535-47bb-0310-9956-ffa450edef68
2013-04-09 20:43:29 +00:00
Gary D. Gregory f57afe607e Fix checksyle trailing space.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465774 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 20:41:29 +00:00
Gary D. Gregory 75b9a4ba4e [CSV-97] Allow the String value for null to be customized for the CSV printer.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465768 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 20:34:49 +00:00
Gary D. Gregory 60cc83af7f Sort members, classes and methods (but not fields).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465763 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 20:23:57 +00:00
Gary D. Gregory afc9de71bd Better parameter name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465753 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 19:57:32 +00:00
Benedikt Ritter a0d975933d [CSV-96] CSVRecord does not verify that the length of the header mapping matches the number of values - convert ArrayIndexOutOfBoundsException to IllegalArgumentException to give users a better feedback about what went wrong
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465738 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 19:34:38 +00:00
Benedikt Ritter 5744ee8a16 Separate testing empty line handling from comment recognition
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465722 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:55:58 +00:00
Benedikt Ritter 449e9a8cf6 Make sure empty lines are ignored by constructing CSVFormat this way. Remove corresponding assert that would have failed if CSVFormat.newBuilder() was changed to withIgnoreEmptyLines(false)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465718 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:37:22 +00:00
Benedikt Ritter 19cb2ca2eb Give test a name that's a bit more expressive and remove comment that is no longer needed
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465715 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:33:36 +00:00
Benedikt Ritter 7c4121b5e0 Remove comment, intention of test is now expressed in its name
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465709 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:27:34 +00:00
Benedikt Ritter 4c8024fb76 Express intention of tokens in token content and give test more structure
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465705 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 18:23:32 +00:00
Benedikt Ritter 1c728b40e5 Give test a name that's a bit more expressive
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465693 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 17:59:02 +00:00
Benedikt Ritter 61a879bf68 Replace assertTokenEquals with Token matcher
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465692 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 17:49:51 +00:00
Benedikt Ritter 4b5e8d70f1 Remove unneeded empty line
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465441 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 18:38:56 +00:00
Benedikt Ritter 759596a54a Correct JavaDoc indentation, remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1465439 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 18:13:36 +00:00
Benedikt Ritter c694d060bd Add missing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1463212 13f79535-47bb-0310-9956-ffa450edef68
2013-04-01 17:24:43 +00:00
Benedikt Ritter 09a6e887b8 Use hasContent matcher token type is not relevant (correct token type recognition is tested by other tests methods)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1463210 13f79535-47bb-0310-9956-ffa450edef68
2013-04-01 17:15:31 +00:00
Benedikt Ritter aef71309b6 Add some matcher implementations as discussed on the ML http://markmail.org/message/k7gzqhbgfyiszyph
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1463207 13f79535-47bb-0310-9956-ffa450edef68
2013-04-01 17:09:24 +00:00
Gary D. Gregory 8f436552ae [CSV-96] CSVRecord does not verify that the length of the header mapping matches the number of values.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1462110 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 14:23:56 +00:00
Gary D. Gregory 08f02a086c Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1462086 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 13:29:36 +00:00
Gary D. Gregory 83ad716bc2 Add a 'using' section to the main page with a short code example and pointers to the Javadoc. Move the "About" section to the end and remove broken package reference.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461338 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 22:12:57 +00:00
Gary D. Gregory 4c530ac40d Better lvar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461307 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 20:52:28 +00:00
Gary D. Gregory 78d7055f71 Minor clean ups.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461302 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 20:46:11 +00:00
Gary D. Gregory 6f1db38058 Better param name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461241 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 17:49:05 +00:00
Gary D. Gregory d10442b68a Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461240 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 17:48:22 +00:00
Gary D. Gregory 9107316c0b Javadoc: use the active voice.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461239 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 17:45:01 +00:00
Gary D. Gregory 05ecd91994 Make internal API package private.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461237 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 17:42:55 +00:00
Gary D. Gregory 193dfd79af Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461225 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 16:47:20 +00:00
Gary D. Gregory ad9e4f3b60 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461222 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 16:46:29 +00:00
Gary D. Gregory 0e2ec48f8e Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461219 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 16:45:01 +00:00
Gary D. Gregory ce1c01c403 Javdoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461217 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 16:43:54 +00:00
Gary D. Gregory ba016bd759 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461213 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 16:36:58 +00:00
Gary D. Gregory df08acad74 Add org.apache.commons.csv.CSVFormat.CSVFormatBuilder.parse(Reader).
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461202 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 16:19:48 +00:00
Gary D. Gregory e33bedefce Change back to DEFAULT format name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461192 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 15:50:18 +00:00
Gary D. Gregory 1e83d1fb59 Better Javadoc hopefully.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461150 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 14:19:00 +00:00
Gary D. Gregory 40948cdcec After discussion on ML (http://apache-commons.680414.n4.nabble.com/CSV-org-apache-commons-csv-CSVFormat-DEFAULT-td4647843.html) from 6 days ago, handle this TODO, and renamed DEFAULT to RFC4180_EMPTY_LINES.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1461134 13f79535-47bb-0310-9956-ffa450edef68
2013-03-26 13:58:30 +00:00
Benedikt Ritter eb13cb152a Fix typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460907 13f79535-47bb-0310-9956-ffa450edef68
2013-03-25 21:37:47 +00:00
Sebastian Bazley 6dc69934d2 Close printer (at least for non-Exception cases - these are unit tests)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460400 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 15:28:11 +00:00
Sebastian Bazley 1b78bc1502 Avoid Eclipse warning
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460396 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 15:14:53 +00:00
Sebastian Bazley 7825b260f3 Avoid double boxing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460392 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 15:10:50 +00:00
Benedikt Ritter dd1ebc9c9a Remove unused import
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460388 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 14:51:25 +00:00
Gary D. Gregory 530d8d1248 Javadoc toBuilder().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460381 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 14:13:48 +00:00
Benedikt Ritter 3358e83a0d Add comment why test uses a different CSVFormat
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460369 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 13:38:32 +00:00
Benedikt Ritter dbbae1eccd Initialize format used by several test methods in setUp
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460367 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 13:36:16 +00:00
Benedikt Ritter 9e3f3cccb2 Remove test method, escaping at EOF is already tested through testEscapingAtEOF()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460365 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 13:30:32 +00:00
Benedikt Ritter 3a1806ba26 Split up escape testing into separate methods, add escaping tests that should work after CSV-58 is resolved (currently ignored)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460364 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 13:29:22 +00:00
Benedikt Ritter 6b67a34b87 Sort methods
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460348 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 13:14:21 +00:00
Gary D. Gregory b01898391d Add a toBuilder method to do:
CSVFormat format = CSVFormat.EXCEL.toBuilder().withHeader("Col1", "Col2", "Col3").build();
Instead of:
CSVFormat format = CSVFormat.newBuilder(CSVFormat.EXCEL).withHeader("Col1", "Col2", "Col3").build();


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460255 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 02:03:16 +00:00
Gary D. Gregory 6b2a504564 Add a toBuilder method to do:
CSVFormat format = CSVFormat.EXCEL.toBuilder().withHeader("Col1", "Col2", "Col3").build();
Instead of:
CSVFormat format = CSVFormat.newBuilder(CSVFormat.EXCEL).withHeader("Col1", "Col2", "Col3").build();


git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460254 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 02:02:11 +00:00
Gary D. Gregory 68f4892138 Fix { } formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460251 13f79535-47bb-0310-9956-ffa450edef68
2013-03-24 01:56:44 +00:00
Benedikt Ritter 3567ad0acc Use Utils class for comparing list of CSVRecords against expectation array
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460194 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 16:57:13 +00:00
Benedikt Ritter 2e543f41f3 Add some unit tests for escape handling in preparation for CSV-58
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460138 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 13:07:04 +00:00
Benedikt Ritter c4014b6b38 Method names should start with a verb
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460136 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 12:48:24 +00:00
Benedikt Ritter 9bafed6b23 Clarify JavaDoc for builder factory method, also remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460134 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 12:01:25 +00:00
Benedikt Ritter 77c6382ee5 Remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460132 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 11:49:00 +00:00
Benedikt Ritter 8989b6fc56 Add missing @Test annotation to testGetHeaderMap()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460126 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 11:16:54 +00:00
Benedikt Ritter 4a70de4b44 Remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1460125 13f79535-47bb-0310-9956-ffa450edef68
2013-03-23 11:14:57 +00:00
Gary D. Gregory e28d4e9c2e Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1459447 13f79535-47bb-0310-9956-ffa450edef68
2013-03-21 18:47:40 +00:00
Gary D. Gregory 6e2c992072 content ivar can be final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1459444 13f79535-47bb-0310-9956-ffa450edef68
2013-03-21 18:42:03 +00:00
Gary D. Gregory cdfa53530d Update site with better build info.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1459403 13f79535-47bb-0310-9956-ffa450edef68
2013-03-21 17:07:23 +00:00
Benedikt Ritter 3f0faa00ed Add missing JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1459020 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 19:52:27 +00:00
Benedikt Ritter b53a171ab3 Format lines that are longer than 120 characters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458805 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 12:43:43 +00:00
Benedikt Ritter 20fe471d40 Format lines that are longer than 120 characters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458803 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 12:42:37 +00:00
Benedikt Ritter c99e6d9ef6 Format lines that are longer than 120 characters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458797 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 12:40:33 +00:00
Benedikt Ritter 961cce294c Format lines that are longer than 120 characters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458794 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 12:39:18 +00:00
Benedikt Ritter 62a527636d Remove trailing white space
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458791 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 12:38:45 +00:00
Benedikt Ritter 2018c0c41f Replace accidentally checked in tab characters with spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458721 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 10:23:30 +00:00
Benedikt Ritter 5e0e7703a1 Format lines that are longer than 120 characters
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458713 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 10:08:17 +00:00
Benedikt Ritter 374cd7b16d Remove trailing white spaces
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458683 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 08:31:14 +00:00
Gary D. Gregory dca481f79c Sort members in AB order.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458639 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:24:27 +00:00
Gary D. Gregory 8f0d0e03d6 Add testRFC4180().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458637 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:23:46 +00:00
Gary D. Gregory 6b1eaad5a6 Javadoc fixes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458636 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:16:26 +00:00
Gary D. Gregory 0956f6e85d Use the same wording in Javadoc as in the API name: "empty".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458635 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:09:48 +00:00
Gary D. Gregory e2e8c2523c Fix spelling in Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458634 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:08:36 +00:00
Gary D. Gregory f656bb7cb6 Fix spelling in Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458633 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:07:05 +00:00
Gary D. Gregory 46b6a2de4c Fix Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458632 13f79535-47bb-0310-9956-ffa450edef68
2013-03-20 05:03:17 +00:00
Gary D. Gregory f6f02e5265 Fix formatting.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1458139 13f79535-47bb-0310-9956-ffa450edef68
2013-03-19 04:54:38 +00:00
Olivier Lamy bc1e1da91f restore download cgi
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1450540 13f79535-47bb-0310-9956-ffa450edef68
2013-02-26 23:54:04 +00:00
Gary D. Gregory 6447a82f35 JUnit 3 -> 4: replace import of junit.framework.Assert with org.junit.Assert.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1437517 13f79535-47bb-0310-9956-ffa450edef68
2013-01-23 16:00:03 +00:00
Gary D. Gregory 71a657004e Where possible:
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1429926 13f79535-47bb-0310-9956-ffa450edef68
2013-01-07 18:00:46 +00:00
Sebastian Bazley 5d15c38eed Explicit boxing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1411923 13f79535-47bb-0310-9956-ffa450edef68
2012-11-20 23:27:49 +00:00
Sebastian Bazley e5a7b27224 More useful to have double-quote as a Character
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1411920 13f79535-47bb-0310-9956-ffa450edef68
2012-11-20 23:24:58 +00:00
Sebastian Bazley 713e9c5382 Make some methods package-protected to avoid the need for synthetic accessors.
TODO consider whether to do so for the fields as well

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1411919 13f79535-47bb-0310-9956-ffa450edef68
2012-11-20 23:22:21 +00:00
Sebastian Bazley 0e35052508 Correct name of character: it's not an escape, it's a backslash
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1411918 13f79535-47bb-0310-9956-ffa450edef68
2012-11-20 23:11:09 +00:00
Gary D. Gregory db11c04d29 [CSV-68] Use the Builder pattern for CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410759 13f79535-47bb-0310-9956-ffa450edef68
2012-11-17 18:00:38 +00:00
Gary D. Gregory e4889167d2 Set Id SVN property.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410084 13f79535-47bb-0310-9956-ffa450edef68
2012-11-15 22:46:56 +00:00
Gary D. Gregory 8b622677c6 Set Id SVN property.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410082 13f79535-47bb-0310-9956-ffa450edef68
2012-11-15 22:45:24 +00:00
Gary D. Gregory 8886fac6d7 Set Id SVN property.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410081 13f79535-47bb-0310-9956-ffa450edef68
2012-11-15 22:44:44 +00:00
Gary D. Gregory 7fa5b4e68f Set Id SVN property.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410080 13f79535-47bb-0310-9956-ffa450edef68
2012-11-15 22:44:23 +00:00
Gary D. Gregory eeeafa5faa Set Id SVN property.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410079 13f79535-47bb-0310-9956-ffa450edef68
2012-11-15 22:43:52 +00:00
Gary D. Gregory 0383fd51df [CSV-68] Use the Builder pattern for CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1410045 13f79535-47bb-0310-9956-ffa450edef68
2012-11-15 21:56:36 +00:00
Gary D. Gregory 68352ee98f Use the final keyword where possible.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1409464 13f79535-47bb-0310-9956-ffa450edef68
2012-11-14 21:58:09 +00:00
Gary D. Gregory cdc8b8f2b1 Organize imports.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1409461 13f79535-47bb-0310-9956-ffa450edef68
2012-11-14 21:56:46 +00:00
Gary D. Gregory 7ac5dd3ec6 Rename methods that create a builder newBuilder().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1409455 13f79535-47bb-0310-9956-ffa450edef68
2012-11-14 21:54:16 +00:00
Gary D. Gregory 6a34b823c8 [CSV-68] Use the Builder pattern for CSVFormat.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1409449 13f79535-47bb-0310-9956-ffa450edef68
2012-11-14 21:50:36 +00:00
Sebastian Bazley d266471b4c Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1399051 13f79535-47bb-0310-9956-ffa450edef68
2012-10-17 00:09:05 +00:00
Gary D. Gregory 7e67e14bb3 A field was left public.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1399049 13f79535-47bb-0310-9956-ffa450edef68
2012-10-17 00:06:14 +00:00
Sebastian Bazley 3daeb02c08 Since DEFAULT is supposed to be RFC4180 + ignore blank lines: make it so
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1399048 13f79535-47bb-0310-9956-ffa450edef68
2012-10-17 00:06:10 +00:00
Gary D. Gregory e04a86ae11 Remove whitespace.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1399047 13f79535-47bb-0310-9956-ffa450edef68
2012-10-17 00:05:42 +00:00
Gary D. Gregory 5a7138a1da Javadoc fix.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1399045 13f79535-47bb-0310-9956-ffa450edef68
2012-10-16 23:44:35 +00:00
Gary D. Gregory 73ec29f75f Rename "line separator" to "record separator".
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398911 13f79535-47bb-0310-9956-ffa450edef68
2012-10-16 18:20:52 +00:00
Sebastian Bazley d8eaf1cd61 Alignment
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398847 13f79535-47bb-0310-9956-ffa450edef68
2012-10-16 15:25:51 +00:00
Gary D. Gregory 933cf2d038 Add // TODO comment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398749 13f79535-47bb-0310-9956-ffa450edef68
2012-10-16 11:51:22 +00:00
Gary D. Gregory ef8a489172 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398748 13f79535-47bb-0310-9956-ffa450edef68
2012-10-16 11:50:29 +00:00
Sebastian Bazley 42757c2376 Multi-parameter ctor is confusing and unnecessary
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398563 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 23:02:59 +00:00
Sebastian Bazley 060fd48fe4 Oops, forgot to use DISABLED char
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398561 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 23:00:43 +00:00
Sebastian Bazley 5c9b878dfd PRISTINE can now be private as we have ctor which allows delimiter to be specified
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398560 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 22:57:51 +00:00
Sebastian Bazley 6f500d6067 Re-introduce DISABLED but as a private constant; only needed for PRISTINE definition
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398559 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 22:56:54 +00:00
Sebastian Bazley cbce4da24b Add ctor to create simplest possible CSV parser
Does not make sense to allow delim = EOL in ctor but disable it in withDelimiter()

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398556 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 22:50:00 +00:00
Sebastian Bazley 91058bb95f Typo
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398370 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 16:29:37 +00:00
Sebastian Bazley 7d8c7f17ff Remove redundant code
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398367 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 16:27:57 +00:00
Sebastian Bazley 3a90cfe249 Explicit unboxing; associated Javadoc
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398365 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 16:27:25 +00:00
Sebastian Bazley 33c004f525 Invalid use of == to compare Character equality; add tests to detect this
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398357 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 16:04:29 +00:00
Sebastian Bazley 6f94c8a3da Explicit unboxing
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398354 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 16:02:32 +00:00
Sebastian Bazley 7c770e0b53 Now that delimiter is a char, simplify API by removing withDelimiter(Character)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398349 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 15:53:09 +00:00
Sebastian Bazley ae5e7898f5 Unused
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398343 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 15:39:30 +00:00
Gary D. Gregory 6870022916 The class implements Closeable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398278 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 13:15:09 +00:00
Gary D. Gregory 4aee321abb The class implements Flushable.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398277 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 13:13:05 +00:00
Gary D. Gregory e1dc4f870e Remove method org.apache.commons.csv.CSVPrinter.print(Object, boolean), it should not have been public in the first place, the format is the API to specify this kind of option.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398276 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 13:12:21 +00:00
Gary D. Gregory 350d34d5cf Rename encapsulator to quote char.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398187 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:37:34 +00:00
Gary D. Gregory ddfe9df74f Rename encapsulator to quote char.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398186 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:30:45 +00:00
Gary D. Gregory 26188064b0 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398185 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:29:23 +00:00
Gary D. Gregory e6f2de0fa8 Organize imports.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398184 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:26:27 +00:00
Gary D. Gregory 6eddd544e5 Javadoc: @version.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398183 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:25:52 +00:00
Gary D. Gregory fc11e68728 Javadoc: @version.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398182 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:22:30 +00:00
Gary D. Gregory e4a6faf8ab Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398181 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:21:54 +00:00
Gary D. Gregory 8aa02596af Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398180 13f79535-47bb-0310-9956-ffa450edef68
2012-10-15 03:20:43 +00:00
Gary D. Gregory 70584f87f5 Fix Javadoc and better lvar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398149 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 23:23:14 +00:00
Gary D. Gregory bdb5842eef Validation fails if no quotes mode set but no escape character is set.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398148 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 23:22:17 +00:00
Gary D. Gregory f51f43d184 Implement Quote.NON_NUMERIC and Quote.MINIMAL. NONE throws a 'not implemented yet' exception.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398137 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 21:23:33 +00:00
Gary D. Gregory b9b3b58cbd Sort members.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398135 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 21:02:55 +00:00
Gary D. Gregory 9c43ad3afb Rename test method.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398134 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 21:02:36 +00:00
Gary D. Gregory 2f2d9aa780 Implement Quote.ALL. Bullet-proof a unit test.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398133 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 21:01:21 +00:00
Gary D. Gregory cdef24d918 Printer can now use a JDBC result set as input. Use H2 as lightweight in-memory JDBC database for easy test set up.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398108 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 18:08:58 +00:00
Gary D. Gregory 1046db8f90 Remove unused imports.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398021 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 06:01:21 +00:00
Gary D. Gregory 010c81e8b4 Add roundtrip test.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398020 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 06:00:40 +00:00
Gary D. Gregory 79eb6e0392 Add APIs to print arrays of records and iterables of records.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398019 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:54:06 +00:00
Gary D. Gregory 7fd16f353a Rename "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me and provides symmetry with quotePolicy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398017 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:10:57 +00:00
Gary D. Gregory 0dbb499888 Rename "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me and provides symmetry with quotePolicy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398016 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:08:47 +00:00
Gary D. Gregory 17139b840f Better lvar names.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398015 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:06:35 +00:00
Gary D. Gregory 53f15f420b Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398014 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:04:21 +00:00
Gary D. Gregory 2ff847ea91 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398013 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:03:35 +00:00
Gary D. Gregory f80c5bd0ad Rename "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me and provides symmetry with quotePolicy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398012 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:01:56 +00:00
Gary D. Gregory f6c9a36ad6 Group quote test fragments together.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398011 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:01:26 +00:00
Gary D. Gregory ecea0c3599 Rename "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me and provides symmetry with quotePolicy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398010 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 05:00:19 +00:00
Gary D. Gregory 6e57364216 Rename "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me and provides symmetry with quotePolicy.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398009 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:56:50 +00:00
Gary D. Gregory 0030e1a9a2 Add quote policy to format. (Considering renaming "encapsulator" to "quoteChar" so we have quoteChar and quotePolicy. Encapsulator makes me want to ask "encapsulate what"? fieldEncapsulator would be better but so verbose, quoteChar feels more to the point to me. )
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398008 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:53:51 +00:00
Gary D. Gregory 33eb71e9a1 In-line comment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398007 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:37:10 +00:00
Gary D. Gregory 7aeddef435 Change the type of printer API to accept Object instead of String.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398006 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:36:51 +00:00
Gary D. Gregory 3be1057064 Change the type of printer API to accept Object instead of String.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398005 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:31:39 +00:00
Gary D. Gregory 68322e0336 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398003 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:07:43 +00:00
Gary D. Gregory 639e68e253 Rename printSep() to printDelimiter().
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398002 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:06:39 +00:00
Gary D. Gregory 75a835a837 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398001 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:02:53 +00:00
Gary D. Gregory e693d87f71 Start of [CSV-53] Allow to always enclose printed values into quotes.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1398000 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 04:01:47 +00:00
Gary D. Gregory 1b4474c0a0 Javadoc: Use the active voice and change one verb.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397999 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 03:43:47 +00:00
Gary D. Gregory eb472cb82a Better lvar name.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397998 13f79535-47bb-0310-9956-ffa450edef68
2012-10-14 03:33:20 +00:00
Gary D. Gregory a50d473a3b Delimiter is not optional so change back type from Character to char. The side effect is that the "pristine" format must be built with somekind of default (',') seems reasonable. The comment used to say "no settings defined" but that was not true, since false was passed in for two values instead of null. IMO, this is all due to the fluent API making this part of the code a little more tricky.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397930 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 19:15:59 +00:00
Gary D. Gregory f074aeedfe Delimiter is not optional so change back type from Character to char. The side effect is that the "pristine" format must be built with somekind of default (',') seems reasonable. The comment used to say "no settings defined" but that was not true, since false was passed in for two values instead of null. IMO, this is all due to the fluent API making this part of the code a little more tricky.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397927 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 19:05:08 +00:00
Gary D. Gregory df592767fc Fix param name and Javadoc to match ivar names.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397925 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 18:58:56 +00:00
Gary D. Gregory c7576ccded Rename method from "is" prefix to "read" prefix because it is not just a test method, it may actually consume input.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397924 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 18:57:09 +00:00
Gary D. Gregory 2a8ce4a11c Rename method from "is" prefix to "read" prefix because it is not just a test method, it may actually consume input.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397923 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 18:56:57 +00:00
Gary D. Gregory 0f8cc2228c In-line comment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397915 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:45:31 +00:00
Gary D. Gregory 8c3aaee61a Rename method from "is" prefix to "read" prefix because it is not just a test method, it may actually consume input.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397914 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:45:05 +00:00
Gary D. Gregory d37f1a6ed7 Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397913 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:42:06 +00:00
Gary D. Gregory 9f6d3f5413 Rename readAgain() to getLastChar()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397911 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:40:05 +00:00
Gary D. Gregory f342cb2caf Validation checks the delimiter character cannot be null.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397909 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:38:39 +00:00
Gary D. Gregory 0e7e9deabb Make package private classes final.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397907 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:28:56 +00:00
Gary D. Gregory 17c26354df org.apache.commons.csv.Token.reset() does not need to return itself. Save a return.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397906 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:24:27 +00:00
Gary D. Gregory aa4d069a7f Javadoc.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397904 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:20:04 +00:00
Gary D. Gregory 6306dd7181 In-line comment.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397903 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:18:56 +00:00
Gary D. Gregory 9542a399b8 It looks like TWO record objects were created for each record read!
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397902 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:16:41 +00:00
Gary D. Gregory 0e8084ab27 Rename getRecord() to nextRecord()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397900 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:13:18 +00:00
Gary D. Gregory 3b938ba40d Let the line number count be a long.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397898 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:11:42 +00:00
Gary D. Gregory daf984983b [CSV-52] Keep track of record numbers.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397895 13f79535-47bb-0310-9956-ffa450edef68
2012-10-13 17:09:48 +00:00