@@ -55,7 +55,7 @@ public class CSVFormat implements Serializable {
5555 private final Character escape ;
5656 private final boolean ignoreSurroundingSpaces ; // Should leading/trailing spaces be ignored around values?
5757 private final boolean ignoreEmptyLines ;
58- private final String lineSeparator ; // for outputs
58+ private final String recordSeparator ; // for outputs
5959 private final String [] header ;
6060
6161 /**
@@ -77,7 +77,7 @@ public class CSVFormat implements Serializable {
7777 .withDelimiter (COMMA )
7878 .withQuoteChar (DOUBLE_QUOTE )
7979 .withIgnoreEmptyLines (true )
80- .withLineSeparator (CRLF );
80+ .withRecordSeparator (CRLF );
8181
8282 /**
8383 * Comma separated format as defined by <a href="http://tools.ietf.org/html/rfc4180">RFC 4180</a>.
@@ -92,7 +92,7 @@ public class CSVFormat implements Serializable {
9292 PRISTINE
9393 .withDelimiter (COMMA )
9494 .withQuoteChar (DOUBLE_QUOTE )
95- .withLineSeparator (CRLF );
95+ .withRecordSeparator (CRLF );
9696
9797 /**
9898 * Excel file format (using a comma as the value delimiter). Note that the actual value delimiter used by Excel is
@@ -108,7 +108,7 @@ public class CSVFormat implements Serializable {
108108 PRISTINE
109109 .withDelimiter (COMMA )
110110 .withQuoteChar (DOUBLE_QUOTE )
111- .withLineSeparator (CRLF );
111+ .withRecordSeparator (CRLF );
112112
113113 /** Tab-delimited format, with quote; leading and trailing spaces ignored. */
114114 public static final CSVFormat TDF =
@@ -117,7 +117,7 @@ public class CSVFormat implements Serializable {
117117 .withQuoteChar (DOUBLE_QUOTE )
118118 .withIgnoreSurroundingSpaces (true )
119119 .withIgnoreEmptyLines (true )
120- .withLineSeparator (CRLF );
120+ .withRecordSeparator (CRLF );
121121
122122 /**
123123 * Default MySQL format used by the <tt>SELECT INTO OUTFILE</tt> and <tt>LOAD DATA INFILE</tt> operations. This is
@@ -131,7 +131,7 @@ public class CSVFormat implements Serializable {
131131 PRISTINE
132132 .withDelimiter (TAB )
133133 .withEscape (ESCAPE )
134- .withLineSeparator (LF );
134+ .withRecordSeparator (LF );
135135
136136 /**
137137 * Creates a basic CSV format.
@@ -161,7 +161,7 @@ public CSVFormat(char delimiter){
161161 * <tt>true</tt> when whitespaces enclosing values should be ignored
162162 * @param ignoreEmptyLines
163163 * <tt>true</tt> when the parser should skip empty lines
164- * @param lineSeparator
164+ * @param recordSeparator
165165 * the line separator to use for output
166166 * @param header
167167 * the header
@@ -181,7 +181,7 @@ public CSVFormat(char delimiter){
181181 this .escape = escape ;
182182 this .ignoreSurroundingSpaces = ignoreSurroundingSpaces ;
183183 this .ignoreEmptyLines = ignoreEmptyLines ;
184- this .lineSeparator = lineSeparator ;
184+ this .recordSeparator = lineSeparator ;
185185 this .header = header ;
186186 }
187187
@@ -262,7 +262,7 @@ public char getDelimiter() {
262262 */
263263 public CSVFormat withDelimiter (final char delimiter ) {
264264 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
265- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
265+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
266266 }
267267
268268 /**
@@ -301,7 +301,7 @@ public CSVFormat withQuoteChar(final Character quoteChar) {
301301 throw new IllegalArgumentException ("The quoteChar cannot be a line break" );
302302 }
303303 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
304- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
304+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
305305 }
306306
307307 /**
@@ -353,7 +353,7 @@ public CSVFormat withCommentStart(final Character commentStart) {
353353 throw new IllegalArgumentException ("The comment start character cannot be a line break" );
354354 }
355355 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
356- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
356+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
357357 }
358358
359359 /**
@@ -403,7 +403,7 @@ public CSVFormat withEscape(final Character escape) {
403403 throw new IllegalArgumentException ("The escape character cannot be a line break" );
404404 }
405405 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
406- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
406+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
407407 }
408408
409409 /**
@@ -435,7 +435,7 @@ public boolean getIgnoreSurroundingSpaces() {
435435 */
436436 public CSVFormat withIgnoreSurroundingSpaces (final boolean ignoreSurroundingSpaces ) {
437437 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
438- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
438+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
439439 }
440440
441441 /**
@@ -458,42 +458,42 @@ public boolean getIgnoreEmptyLines() {
458458 */
459459 public CSVFormat withIgnoreEmptyLines (final boolean ignoreEmptyLines ) {
460460 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
461- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
461+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
462462 }
463463
464464 /**
465465 * Returns the line separator delimiting output records.
466466 *
467467 * @return the line separator
468468 */
469- public String getLineSeparator () {
470- return lineSeparator ;
469+ public String getRecordSeparator () {
470+ return recordSeparator ;
471471 }
472472
473473 /**
474- * Returns a copy of this format using the specified output line separator.
474+ * Returns a copy of this format using the specified output record separator.
475475 *
476- * @param lineSeparator
477- * the line separator to use for output.
476+ * @param recordSeparator
477+ * the record separator to use for output.
478478 *
479- * @return A copy of this format using the specified output line separator
479+ * @return A copy of this format using the specified output record separator
480480 */
481- public CSVFormat withLineSeparator (final char lineSeparator ) {
481+ public CSVFormat withRecordSeparator (final char recordSeparator ) {
482482 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
483- ignoreSurroundingSpaces , ignoreEmptyLines , String .valueOf (lineSeparator ), header );
483+ ignoreSurroundingSpaces , ignoreEmptyLines , String .valueOf (recordSeparator ), header );
484484 }
485485
486486 /**
487- * Returns a copy of this format using the specified output line separator.
487+ * Returns a copy of this format using the specified output record separator.
488488 *
489- * @param lineSeparator
490- * the line separator to use for output.
489+ * @param recordSeparator
490+ * the record separator to use for output.
491491 *
492- * @return A copy of this format using the specified output line separator
492+ * @return A copy of this format using the specified output record separator
493493 */
494- public CSVFormat withLineSeparator (final String lineSeparator ) {
494+ public CSVFormat withRecordSeparator (final String recordSeparator ) {
495495 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
496- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
496+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
497497 }
498498
499499 /**
@@ -506,7 +506,7 @@ public CSVFormat withLineSeparator(final String lineSeparator) {
506506 */
507507 public CSVFormat withQuotePolicy (final Quote quotePolicy ) {
508508 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
509- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
509+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
510510 }
511511
512512 String [] getHeader () {
@@ -534,7 +534,7 @@ String[] getHeader() {
534534 */
535535 public CSVFormat withHeader (final String ... header ) {
536536 return new CSVFormat (delimiter , quoteChar , quotePolicy , commentStart , escape ,
537- ignoreSurroundingSpaces , ignoreEmptyLines , lineSeparator , header );
537+ ignoreSurroundingSpaces , ignoreEmptyLines , recordSeparator , header );
538538 }
539539
540540 /**
0 commit comments