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
This commit is contained in:
Benedikt Ritter 2013-03-20 12:43:43 +00:00
parent 20fe471d40
commit b53a171ab3
1 changed files with 4 additions and 2 deletions

View File

@ -152,7 +152,8 @@ public class CSVPrinter implements Flushable, Closeable {
println();
}
private void print(final Object object, final CharSequence value, final int offset, final int len) throws IOException {
private void print(final Object object, final CharSequence value,
final int offset, final int len) throws IOException {
if (format.isQuoting()) {
printAndQuote(object, value, offset, len);
} else if (format.isEscaping()) {
@ -215,7 +216,8 @@ public class CSVPrinter implements Flushable, Closeable {
/*
* Note: must only be called if quoting is enabled, otherwise will generate NPE
*/
void printAndQuote(final Object object, final CharSequence value, final int offset, final int len) throws IOException {
void printAndQuote(final Object object, final CharSequence value,
final int offset, final int len) throws IOException {
final boolean first = newLine; // is this the first value on this line?
boolean quote = false;
int start = offset;