public class CSVParserWriter extends AbstractCSVWriter
| Modifier and Type | Field and Description |
|---|---|
protected ICSVParser |
parser |
exceptionDEFAULT_ESCAPE_CHARACTER, DEFAULT_LINE_END, DEFAULT_QUOTE_CHARACTER, DEFAULT_SEPARATOR, INITIAL_STRING_SIZE, NO_ESCAPE_CHARACTER, NO_QUOTE_CHARACTER, RFC4180_LINE_END| Constructor and Description |
|---|
CSVParserWriter(Writer writer,
ICSVParser parser,
String lineEnd)
Constructor for the CSVParserWriter.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
writeNext(String[] nextLine,
boolean applyQuotesToAll,
Appendable appendable)
Writes the next line to the file.
|
checkError, close, flush, getException, getLineEnd, getWriter, resetError, resultService, setResultService, writeAll, writeAll, writeColumnNames, writeNextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitflushQuietly, writeAll, writeAll, writeAll, writeAll, writeAll, writeNextprotected final ICSVParser parser
public CSVParserWriter(Writer writer, ICSVParser parser, String lineEnd)
writer - - The writer to an underlying CSV source.parser - - ICSVParser to convert the String array to csv formatted string.lineEnd - - Desired line end String (either "\n" or "\r\n").protected void writeNext(String[] nextLine, boolean applyQuotesToAll, Appendable appendable) throws IOException
AbstractCSVWriterwriteNext in class AbstractCSVWriternextLine - a string array with each comma-separated element as a separate
entry.applyQuotesToAll - true if all values are to be quoted. false applies quotes only
to values which contain the separator, escape, quote or new line characters.appendable - Appendable used as buffer.IOException - Exceptions thrown by the writer supplied to CSVWriter.Copyright © 2005–2025. All rights reserved.