Class CsvStringRecordsWriter

  • All Implemented Interfaces:
    java.lang.AutoCloseable, 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<java.lang.String>, RecordsWriter<java.lang.String>, 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

    public class CsvStringRecordsWriter
    extends CsvRecordsWriter<java.lang.String>
    Author:
    steiner
    • Constructor Detail

      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(ColumnFactory<java.lang.String> aColumnFactory,
                                      java.io.File aFile,
                                      char aCsvDelimiter)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(ColumnFactory<java.lang.String> aColumnFactory,
                                      java.io.File aFile)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(ColumnFactory<java.lang.String> aColumnFactory,
                                      java.io.OutputStream aOutputStream,
                                      char aCsvDelimiter)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(ColumnFactory<java.lang.String> aColumnFactory,
                                      java.io.OutputStream aOutputStream)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(ColumnFactory<java.lang.String> aColumnFactory,
                                      java.io.PrintStream aOutputStream,
                                      char aCsvDelimiter)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(ColumnFactory<java.lang.String> aColumnFactory,
                                      java.io.PrintStream aPrintStream)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(java.io.File aFile)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(java.io.File aFile,
                                      char aCsvDelimiter)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(Header<java.lang.String> aHeader,
                                      java.io.File aFile,
                                      char aCsvDelimiter)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(Header<java.lang.String> aHeader,
                                      java.io.File aFile)
                               throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(Header<java.lang.String> aHeader,
                                      java.io.OutputStream aOutputStream,
                                      char aCsvDelimiter)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(Header<java.lang.String> aHeader,
                                      java.io.OutputStream aOutputStream)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(Header<java.lang.String> aHeader,
                                      java.io.PrintStream aPrintStream,
                                      char aCsvDelimiter)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(Header<java.lang.String> aHeader,
                                      java.io.PrintStream aPrintStream)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(java.io.OutputStream aOutputStream)
      • CsvStringRecordsWriter

        public CsvStringRecordsWriter​(java.io.PrintStream aPrintStream)
    • Method Detail

      • withTrim

        public CsvStringRecordsWriter withTrim​(boolean isTrimRecords)
        Specified by:
        withTrim in interface org.refcodes.mixin.TrimAccessor.TrimBuilder<org.refcodes.textual.CsvMixin>
        Overrides:
        withTrim in class CsvRecordsWriter<java.lang.String>
      • withCsvEscapeMode

        public CsvStringRecordsWriter withCsvEscapeMode​(org.refcodes.textual.CsvEscapeMode aCsvEscapeMode)
        Specified by:
        withCsvEscapeMode in interface org.refcodes.textual.CsvEscapeModeAccessor.CsvEscapeModeBuilder<org.refcodes.textual.CsvMixin>
        Overrides:
        withCsvEscapeMode in class CsvRecordsWriter<java.lang.String>
      • withDelimiter

        public CsvStringRecordsWriter withDelimiter​(char aCsvDelimiter)
        Specified by:
        withDelimiter in interface org.refcodes.mixin.DelimiterAccessor.DelimiterBuilder<org.refcodes.textual.CsvMixin>
        Overrides:
        withDelimiter in class CsvRecordsWriter<java.lang.String>
      • writeNext

        public void writeNext​(java.lang.String... aRecord)
                       throws java.lang.IllegalArgumentException
        Provides the String variant of the CsvRecordsWriter.writeNext(Object...) method.
        Parameters:
        aRecord - The String instances to be logged.
        Throws:
        java.lang.IllegalArgumentException - thrown in case the provided String instances do not align with the header (as of CsvRecordsWriter.getHeader()).