Class CsvStringRecordWriter

java.lang.Object
org.refcodes.tabular.CsvRecordWriter<String>
org.refcodes.tabular.CsvStringRecordWriter
All Implemented Interfaces:
AutoCloseable, org.refcodes.io.RowWriter<String[]>, 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<String>, RecordWriter<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 CsvStringRecordWriter extends CsvRecordWriter<String>
Author:
steiner
  • Constructor Details

    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, PrintStream aPrintStream, char aCsvDelimiter)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aPrintStream - The PrintStream to be used for printing output.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, File aFile, char aCsvDelimiter) throws FileNotFoundException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aFile - the File to which to write.
      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
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, File aFile, Charset aEncoding, char aCsvDelimiter) throws IOException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aFile - the File to which to write.
      aEncoding - The Charset 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.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, File aFile, Charset aEncoding) throws IOException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aFile - the File to which to write.
      aEncoding - The Charset for the character encoding to use.
      Throws:
      IOException - in case the file is not found or the encoding is not supported.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, File aFile) throws FileNotFoundException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aFile - the File to which to write.
      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.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, OutputStream aOutputStream, char aCsvDelimiter)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aOutputStream - The OutputStream where to write to.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, OutputStream aOutputStream, Charset aEncoding, char aCsvDelimiter) throws UnsupportedEncodingException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aOutputStream - The OutputStream where to write to.
      aEncoding - The Charset 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.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, OutputStream aOutputStream, Charset aEncoding) throws UnsupportedEncodingException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aOutputStream - The OutputStream where to write to.
      aEncoding - The Charset for the character encoding to use.
      Throws:
      UnsupportedEncodingException - thrown in case an unsupported encoding (Charset) has been provided.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, OutputStream aOutputStream)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aOutputStream - The OutputStream where to write to.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(String[] aHeader, PrintStream aPrintStream)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aHeader - The String elements representing the header used for logging in the correct format.
      aPrintStream - The PrintStream to be used for printing.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(PrintStream aPrintStream, char aCsvDelimiter, String... aHeader)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aPrintStream - The PrintStream to be used for printing output.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
      aHeader - The String elements representing the header used for logging in the correct format.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, char aCsvDelimiter, String... aHeader) throws FileNotFoundException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aFile - the File to which to write.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
      aHeader - The String elements representing the header used for logging in the correct format.
      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
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, Charset aEncoding, char aCsvDelimiter, String... aHeader) throws IOException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aFile - the File to which to write.
      aEncoding - The Charset for the character encoding to use.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
      aHeader - The String elements representing the header used for logging in the correct format.
      Throws:
      IOException - in case the file is not found or the encoding is not supported.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, Charset aEncoding, String... aHeader) throws IOException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aFile - the File to which to write.
      aEncoding - The Charset for the character encoding to use.
      aHeader - The String elements representing the header used for logging in the correct format.
      Throws:
      IOException - in case the file is not found or the encoding is not supported.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, String... aHeader) throws FileNotFoundException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aFile - the File to which to write.
      aHeader - The String elements representing the header used for logging in the correct format.
      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.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, char aCsvDelimiter, String... aHeader)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aOutputStream - The OutputStream where to write to.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
      aHeader - The String elements representing the header used for logging in the correct format.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, Charset aEncoding, char aCsvDelimiter, String... aHeader) throws UnsupportedEncodingException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aOutputStream - The OutputStream where to write to.
      aEncoding - The Charset for the character encoding to use.
      aCsvDelimiter - The separator to be used when separating the CSV values in the log output.
      aHeader - The String elements representing the header used for logging in the correct format.
      Throws:
      UnsupportedEncodingException - thrown in case an unsupported encoding (Charset) has been provided.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, Charset aEncoding, String... aHeader) throws UnsupportedEncodingException
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aOutputStream - The OutputStream where to write to.
      aEncoding - The Charset for the character encoding to use.
      aHeader - The String elements representing the header used for logging in the correct format.
      Throws:
      UnsupportedEncodingException - thrown in case an unsupported encoding (Charset) has been provided.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, String... aHeader)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aOutputStream - The OutputStream where to write to.
      aHeader - The String elements representing the header used for logging in the correct format.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(PrintStream aPrintStream, String... aHeader)
      Constructs a CsvRecordWriter with the given header for logging.
      Parameters:
      aPrintStream - The PrintStream to be used for printing.
      aHeader - The String elements representing the header used for logging in the correct format.
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, char aCsvDelimiter) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, Charset aEncoding, char aCsvDelimiter) throws IOException
      Throws:
      IOException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile, Charset aEncoding) throws IOException
      Throws:
      IOException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(File aFile) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, char aCsvDelimiter)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, Charset aEncoding, char aCsvDelimiter) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream, Charset aEncoding) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(OutputStream aOutputStream)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(PrintStream aPrintStream, char aCsvDelimiter)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(PrintStream aPrintStream)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, PrintStream aPrintStream, char aCsvDelimiter)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, File aFile, char aCsvDelimiter) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, File aFile, Charset aEncoding, char aCsvDelimiter) throws IOException
      Throws:
      IOException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, File aFile, Charset aEncoding) throws IOException
      Throws:
      IOException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, File aFile) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, OutputStream aOutputStream, char aCsvDelimiter)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, OutputStream aOutputStream, Charset aEncoding, char aCsvDelimiter) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, OutputStream aOutputStream, Charset aEncoding) throws UnsupportedEncodingException
      Throws:
      UnsupportedEncodingException
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, OutputStream aOutputStream)
    • CsvStringRecordWriter

      public CsvStringRecordWriter(Header<String> aHeader, PrintStream aPrintStream)
  • Method Details