Patch attached. Overview of changes:
- CSVPrinter no longer wraps the provided writer in a PrintWriter... the reason is that the passed writer can often be more efficient than PrintWriter.
- CSVPrinter no longer flushes all of the time - that should be up to the user
- users have access to the lowest level if desired... ability to pass a char + length/offset
- rewrote the output methods: writing no longer uses a StringBuffer, and writes are done in big chunks, not character-by-character
- removed the use of the system property "line.separator" - local specific behavior should normally be avoided. A printerNewline was added to the strategy instead.
- in CSVParser, only throw away leading whitespace if the strategy calls for it
- added round-trip testing with random strings to ensure that encapsulation and escaping strategies can be both correctly encoded and then decoded with no loss of information.
During testing, I hit an issue where the tests ran fine in my IDE, but failed for "mvn test". I tracked this down to the fact that many tests were actually changing the default strategy object. This test code was changed to make a clone if they were going to change it.