java.lang.Object
org.refcodes.tabular.CsvRecordWriter<T>
- Type Parameters:
T
- The type of theRecord
instances being used.
- All Implemented Interfaces:
AutoCloseable
,org.refcodes.io.RowWriter<T[]>
,org.refcodes.mixin.DelimiterAccessor
,org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<org.refcodes.textual.CsvMixin>
,org.refcodes.mixin.DelimiterAccessor.DelimiterMutator
,org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
,org.refcodes.mixin.TrimAccessor
,org.refcodes.mixin.TrimAccessor.TrimBuilder<org.refcodes.textual.CsvMixin>
,org.refcodes.mixin.TrimAccessor.TrimMutator
,org.refcodes.mixin.TrimAccessor.TrimProperty
,HeaderAccessor<T>
,RecordWriter<T>
,org.refcodes.textual.CsvEscapeModeAccessor
,org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<org.refcodes.textual.CsvMixin>
,org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeMutator
,org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
,org.refcodes.textual.CsvMixin
- Direct Known Subclasses:
CsvStringRecordWriter
public class CsvRecordWriter<T>
extends Object
implements org.refcodes.textual.CsvMixin, RecordWriter<T>
The
CsvRecordWriter
writes CSV-Data.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.textual.CsvEscapeModeAccessor
org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<B extends org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<?>>, org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeMutator, org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.DelimiterAccessor
org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B extends org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<B>>, org.refcodes.mixin.DelimiterAccessor.DelimiterMutator, org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
Nested classes/interfaces inherited from interface org.refcodes.tabular.HeaderAccessor
HeaderAccessor.HeaderBuilder<T extends HeaderAccessor.HeaderBuilder<?>>, HeaderAccessor.HeaderMutator<T>, HeaderAccessor.HeaderProperty<T>
Nested classes/interfaces inherited from interface org.refcodes.mixin.TrimAccessor
org.refcodes.mixin.TrimAccessor.TrimBuilder<B extends org.refcodes.mixin.TrimAccessor.TrimBuilder<B>>, org.refcodes.mixin.TrimAccessor.TrimMutator, org.refcodes.mixin.TrimAccessor.TrimProperty
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionCsvRecordWriter
(File aCsvFile) Constructs aCsvRecordWriter
.CsvRecordWriter
(File aCsvFile, char aCsvDelimiter) Constructs aCsvRecordWriter
.CsvRecordWriter
(File aCsvFile, Charset aEncoding) Constructs aCsvRecordWriter
.CsvRecordWriter
(File aCsvFile, Charset aEncoding, char aCsvDelimiter) Constructs aCsvRecordWriter
.CsvRecordWriter
(OutputStream aCsvOutputStream) Constructs aCsvRecordWriter
.CsvRecordWriter
(OutputStream aCsvOutputStream, Charset aEncoding) Constructs aCsvRecordWriter
.CsvRecordWriter
(PrintStream aPrintStream) Constructs aCsvRecordWriter
.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, File aCsvFile) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, File aCsvFile, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, File aCsvFile, Charset aEncoding) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, File aCsvFile, Charset aEncoding, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream, Charset aEncoding) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream, Charset aEncoding, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, PrintStream aPrintStream) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(ColumnFactory<T> aColumnFactory, PrintStream aPrintStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, File aCsvFile) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, File aCsvFile, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, File aCsvFile, Charset aEncoding) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, File aCsvFile, Charset aEncoding, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, OutputStream aCsvOutputStream) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, OutputStream aCsvOutputStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, OutputStream aCsvOutputStream, Charset aEncoding) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, OutputStream aCsvOutputStream, Charset aEncoding, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, PrintStream aPrintStream) Constructs aCsvRecordWriter
with the given header for logging.CsvRecordWriter
(Header<T> aHeader, PrintStream aPrintStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.protected
CsvRecordWriter
(Header<T> aHeader, ColumnFactory<T> aColumnFactory, PrintStream aPrintStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
close()
String[]
org.refcodes.textual.CsvEscapeMode
char
Retrieves theHeader
property.boolean
isTrim()
void
parseHeader
(String... aHeader) void
setCommentPrefixes
(String... aCommentPrefixes) void
setCsvEscapeMode
(org.refcodes.textual.CsvEscapeMode aCsvEscapeMode) void
setDelimiter
(char aCsvDelimiter) void
setTrim
(boolean isTrim) withCommentPrefixes
(String... aCommentPrefixes) withCsvEscapeMode
(org.refcodes.textual.CsvEscapeMode aCsvEscapeMode) withDelimiter
(char aCsvDelimiter) withTrim
(boolean isTrimRecords) void
writeComment
(String aComment) Writes a comment by using the fist defined comment prefix as ofgetCommentPrefixes()
suffixed with a space (" ") followed by the comment (as of theCsvMixin.toComment(String)
).void
Writes the CSV header to the writer (be it a Stream or a File).void
writeHeader
(String... aHeader) void
writeHeader
(Header<T> aHeader) Sets and writes the providedHeader
to the writer (be it a Stream or a File). .void
void
writeHeaderComment
(String... aHeader) void
writeHeaderComment
(Header<T> aHeader) void
Directly logs the providedString
instances to the writer.void
Directly logs the provided instances to the writer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeProperty
letCsvEscapeMode
Methods inherited from interface org.refcodes.textual.CsvMixin
isComment, toComment, uncomment
Methods inherited from interface org.refcodes.mixin.DelimiterAccessor.DelimiterProperty
letDelimiter
Methods inherited from interface org.refcodes.tabular.RecordWriter
writeNextLine, writeNextType
Methods inherited from interface org.refcodes.mixin.TrimAccessor.TrimProperty
letTrim
-
Field Details
-
_header
-
_outputStream
-
_csvBuilder
protected org.refcodes.textual.CsvBuilder _csvBuilder
-
-
Constructor Details
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.- Throws:
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
-
CsvRecordWriter
public CsvRecordWriter(Header<T> aHeader, File aCsvFile, char aCsvDelimiter) throws FileNotFoundException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
-
CsvRecordWriter
Constructs aCsvRecordWriter
.- Parameters:
aCsvFile
- TheFile
to be used for printing output.- Throws:
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
-
CsvRecordWriter
Constructs aCsvRecordWriter
.- Parameters:
aCsvFile
- TheFile
to be used for printing output. aCsvDelimiter The separator to be used when separating the CSV values in the log output.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.
-
CsvRecordWriter
Constructs aCsvRecordWriter
.- Parameters:
aCsvOutputStream
- TheOutputStream
to be used for printing output.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.- Throws:
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, File aCsvFile, char aCsvDelimiter) throws FileNotFoundException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
FileNotFoundException
- If the given file object does not denote an existing, writable regular file and a new regular file of that name cannot be created, or if some other error occurs while opening or creating the file.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.- Throws:
IOException
- in case the file is not found or the encoding is not supported.
-
CsvRecordWriter
public CsvRecordWriter(Header<T> aHeader, File aCsvFile, Charset aEncoding, char aCsvDelimiter) throws IOException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
IOException
- in case the file is not found or the encoding is not supported.
-
CsvRecordWriter
Constructs aCsvRecordWriter
.- Parameters:
aCsvFile
- TheFile
to be used for printing output.aEncoding
- the encoding- Throws:
IOException
- in case the file is not found or the encoding is not supported.
-
CsvRecordWriter
Constructs aCsvRecordWriter
.- Parameters:
aCsvFile
- TheFile
to be used for printing output. aCsvDelimiter The separator to be used when separating the CSV values in the log output.aEncoding
- the encodingaCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
IOException
- in case the file is not found or the encoding is not supported.
-
CsvRecordWriter
public CsvRecordWriter(Header<T> aHeader, OutputStream aCsvOutputStream, Charset aEncoding) throws UnsupportedEncodingException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.- Throws:
UnsupportedEncodingException
- thrown in case an unsupported encoding (Charset
) has been provided.
-
CsvRecordWriter
public CsvRecordWriter(Header<T> aHeader, OutputStream aCsvOutputStream, Charset aEncoding, char aCsvDelimiter) throws UnsupportedEncodingException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
UnsupportedEncodingException
- thrown in case an unsupported encoding (Charset
) has been provided.
-
CsvRecordWriter
public CsvRecordWriter(OutputStream aCsvOutputStream, Charset aEncoding) throws UnsupportedEncodingException Constructs aCsvRecordWriter
.- Parameters:
aCsvOutputStream
- TheOutputStream
to be used for printing output.aEncoding
- the encoding- Throws:
UnsupportedEncodingException
- thrown in case an unsupported encoding (Charset
) has been provided.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, File aCsvFile, Charset aEncoding) throws IOException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.- Throws:
IOException
- in case the file is not found or the encoding is not supported.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, File aCsvFile, Charset aEncoding, char aCsvDelimiter) throws IOException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvFile
- TheFile
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
IOException
- in case the file is not found or the encoding is not supported.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream, Charset aEncoding) throws UnsupportedEncodingException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.- Throws:
UnsupportedEncodingException
- thrown in case an unsupported encoding (Charset
) has been provided.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, OutputStream aCsvOutputStream, Charset aEncoding, char aCsvDelimiter) throws UnsupportedEncodingException Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aCsvOutputStream
- TheOutputStream
to be used for printing.aEncoding
- TheCharset
for the character encoding to use.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.- Throws:
UnsupportedEncodingException
- thrown in case an unsupported encoding (Charset
) has been provided.
-
CsvRecordWriter
Constructs aCsvRecordWriter
.- Parameters:
aPrintStream
- ThePrintStream
to be used for printing.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- The header used for logging in the correct format.aPrintStream
- ThePrintStream
to be used for printing.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aPrintStream
- ThePrintStream
to be used for printing.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.
-
CsvRecordWriter
Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aPrintStream
- ThePrintStream
to be used for printing.
-
CsvRecordWriter
public CsvRecordWriter(ColumnFactory<T> aColumnFactory, PrintStream aPrintStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aColumnFactory
- AColumnFactory
to be used to generateColumn
instances from the top line of the CSF file, required for parsing the CSV lines and converting them toRecord
instances.aPrintStream
- ThePrintStream
to be used for printing output.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.
-
CsvRecordWriter
protected CsvRecordWriter(Header<T> aHeader, ColumnFactory<T> aColumnFactory, PrintStream aPrintStream, char aCsvDelimiter) Constructs aCsvRecordWriter
with the given header for logging.- Parameters:
aHeader
- The header used for logging in the correct format.aColumnFactory
- AColumnFactory
to be used to generateColumn
instances from the top line of the CSF file, required for parsing the CSV lines and converting them toRecord
instances.aPrintStream
- ThePrintStream
to be used for printing output.aCsvDelimiter
- The separator to be used when separating the CSV values in the log output.
-
-
Method Details
-
setCommentPrefixes
- Specified by:
setCommentPrefixes
in interfaceorg.refcodes.textual.CsvMixin
-
getCommentPrefixes
- Specified by:
getCommentPrefixes
in interfaceorg.refcodes.textual.CsvMixin
-
clearCommentPrefixes
public void clearCommentPrefixes()- Specified by:
clearCommentPrefixes
in interfaceorg.refcodes.textual.CsvMixin
-
withCommentPrefixes
- Specified by:
withCommentPrefixes
in interfaceorg.refcodes.textual.CsvMixin
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
getCsvEscapeMode
public org.refcodes.textual.CsvEscapeMode getCsvEscapeMode()- Specified by:
getCsvEscapeMode
in interfaceorg.refcodes.textual.CsvEscapeModeAccessor
-
isTrim
public boolean isTrim()- Specified by:
isTrim
in interfaceorg.refcodes.mixin.TrimAccessor
-
getDelimiter
public char getDelimiter()- Specified by:
getDelimiter
in interfaceorg.refcodes.mixin.DelimiterAccessor
-
setTrim
public void setTrim(boolean isTrim) - Specified by:
setTrim
in interfaceorg.refcodes.mixin.TrimAccessor.TrimMutator
-
setDelimiter
public void setDelimiter(char aCsvDelimiter) - Specified by:
setDelimiter
in interfaceorg.refcodes.mixin.DelimiterAccessor.DelimiterMutator
-
withTrim
- Specified by:
withTrim
in interfaceorg.refcodes.mixin.TrimAccessor.TrimBuilder<T>
-
withCsvEscapeMode
- Specified by:
withCsvEscapeMode
in interfaceorg.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<T>
-
withDelimiter
- Specified by:
withDelimiter
in interfaceorg.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<T>
-
setCsvEscapeMode
public void setCsvEscapeMode(org.refcodes.textual.CsvEscapeMode aCsvEscapeMode) - Specified by:
setCsvEscapeMode
in interfaceorg.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeMutator
-
parseHeader
Parses and sets theHeader
from the providedString
. You must have provided aColumnFactory
for this operation to succeed.- Specified by:
parseHeader
in interfaceRecordWriter<T>
- Parameters:
aHeader
- The header to be created.
-
writeHeader
Parses and sets theHeader
from the providedString
arguments and writes the CSV header to the writer (be it a Stream or a File). You must have provided aColumnFactory
for this operation to succeed.- Specified by:
writeHeader
in interfaceRecordWriter<T>
- Parameters:
aHeader
- The header to be created.
-
writeHeader
Sets and writes the providedHeader
to the writer (be it a Stream or a File). .- Specified by:
writeHeader
in interfaceRecordWriter<T>
- Parameters:
aHeader
- The header to be created.
-
writeHeader
public void writeHeader()Writes the CSV header to the writer (be it a Stream or a File). You must have provided aHeader
for this operation to succeed.- Specified by:
writeHeader
in interfaceRecordWriter<T>
-
writeNext
Directly logs the provided instances to the writer.- Specified by:
writeNext
in interfaceRecordWriter<T>
- Specified by:
writeNext
in interfaceorg.refcodes.io.RowWriter<T>
- Parameters:
aRecord
- The instances to be logged.- Throws:
IllegalArgumentException
- thrown in case the provided objects do not align with the header (as ofHeaderAccessor.getHeader()
).
-
writeNext
Directly logs the providedString
instances to the writer.- Specified by:
writeNext
in interfaceRecordWriter<T>
- Parameters:
aRecord
- TheString
instances to be logged.- Throws:
ColumnMismatchException
- Thrown in case a value was found in the e.g. in aRecord
of the wrong type than specified by a providedColumn
(of for example aHeader
).HeaderMismatchException
- Thrown in case there is a mismatch between the givenHeaderMismatchException
and theRow
, i.e. the index for the given key in the header may be out of index of the given row or the given key does not exist in theHeader
.
-
writeComment
Writes a comment by using the fist defined comment prefix as ofgetCommentPrefixes()
suffixed with a space (" ") followed by the comment (as of theCsvMixin.toComment(String)
). If no prefix has been set, then anIllegalStateException
will be thrown.- Parameters:
aComment
- The comment to be written.- Throws:
IllegalStateException
- in case no comment prefixes have been set viasetCommentPrefixes(String...)
orwithCommentPrefixes(String...)
.
-
writeHeaderComment
- Parameters:
aHeader
- TheHeader
to be written as a comment.
-
writeHeaderComment
- Parameters:
aHeader
- TheHeader
to be written as a comment.
-
writeHeaderComment
public void writeHeaderComment() -
getHeader
Retrieves theHeader
property.- Specified by:
getHeader
in interfaceHeaderAccessor<T>
- Returns:
- The
Header
being stored by this property.
-