Module org.jooq
Package org.jooq

Class CSVFormat


  • public final class CSVFormat
    extends Object
    A CSV formatting type, which can be used to configure CSV imports / exports.
    Author:
    Lukas Eder
    • Constructor Detail

      • CSVFormat

        public CSVFormat()
    • Method Detail

      • delimiter

        public CSVFormat delimiter​(String newDelimiter)
        The delimiter to be used between CSV cells, defaulting to ",".

        Using "," a,b,c
        Using ";" a;b;c
      • delimiter

        public CSVFormat delimiter​(char newDelimiter)
        The delimiter to be used between CSV cells, defaulting to ",".

        Using "," a,b,c
        Using ";" a;b;c
      • delimiter

        public String delimiter()
        The delimiter to be used between CSV cells, defaulting to ",".

        Using "," a,b,c
        Using ";" a;b;c
      • nullString

        public CSVFormat nullString​(String newNullString)
        The string to be used for null values, defaulting to the empty string.

        Using "" a,,c
        Using "\"\"" a,"",c
        Using "{null}" a,{null},c
      • nullString

        public String nullString()
        The string to be used for null values, defaulting to the empty string.

        Using "" a,,c
        Using "\"\"" a,"",c
        Using "{null}" a,{null},c
      • emptyString

        public CSVFormat emptyString​(String newEmptyString)
        The string to be used for "" values, defaulting to the empty string.

        Using "" a,,c
        Using "\"\"" a,"",c
      • emptyString

        public String emptyString()
        The string to be used for "" values, defaulting to the empty string.

        Using "" a,,c
        Using "\"\"" a,"",c
      • newline

        public CSVFormat newline​(String newNewline)
        The string to be used to separate rows, defaulting to \n.
      • newline

        public String newline()
        The string to be used to separate rows, defaulting to \n.
      • quoteString

        public CSVFormat quoteString​(String newQuoteString)
        The string used to quote values according to the rules specified in quote().
      • quoteString

        public String quoteString()
        The string used to quote values according to the rules specified in quote().
      • header

        public CSVFormat header​(boolean newHeader)
        Whether to emit a header row with column names, defaulting to true.
      • header

        public boolean header()
        Whether to emit a header row with column names, defaulting to true.