com.groupdocs.assembly

Class CsvDataLoadOptions

  • java.lang.Object
    • com.groupdocs.assembly.CsvDataLoadOptions


  • public class CsvDataLoadOptions
    extends java.lang.Object
    Represents options for parsing CSV data. An instance of this class can be passed into constructors of CsvDataSource.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CsvDataLoadOptions()
      Initializes a new instance of this class with default options.
      CsvDataLoadOptions(boolean hasHeaders)
      Initializes a new instance of this class with specifying whether CSV data contains column names at the first line.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      char getCommentChar()
      Gets the character that is used to comment lines of CSV data.
      char getDelimiter()
      Gets the character to be used as a column delimiter.
      char getQuoteChar()
      Gets the character that is used to quote field values.
      boolean hasHeaders()
      Gets a value indicating whether the first line of CSV data contains column names.
      void hasHeaders(boolean value)
      Sets a value indicating whether the first line of CSV data contains column names.
      void setCommentChar(char value)
      Sets the character that is used to comment lines of CSV data.
      void setDelimiter(char value)
      Sets the character to be used as a column delimiter.
      void setQuoteChar(char value)
      Sets the character that is used to quote field values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CsvDataLoadOptions

        public CsvDataLoadOptions()
        Initializes a new instance of this class with default options.
      • CsvDataLoadOptions

        public CsvDataLoadOptions(boolean hasHeaders)
        Initializes a new instance of this class with specifying whether CSV data contains column names at the first line.
    • Method Detail

      • hasHeaders

        public boolean hasHeaders()
        Gets a value indicating whether the first line of CSV data contains column names. The default value is false.
        Returns:
        A value indicating whether the first line of CSV data contains column names.
      • hasHeaders

        public void hasHeaders(boolean value)
        Sets a value indicating whether the first line of CSV data contains column names. The default value is false.
        Parameters:
        value - A value indicating whether the first line of CSV data contains column names.
      • getDelimiter

        public char getDelimiter()
        Gets the character to be used as a column delimiter. The default value is ',' (comma).
        Returns:
        The character to be used as a column delimiter.
      • setDelimiter

        public void setDelimiter(char value)
        Sets the character to be used as a column delimiter. The default value is ',' (comma).
        Parameters:
        value - The character to be used as a column delimiter.
      • getQuoteChar

        public char getQuoteChar()
        Gets the character that is used to quote field values.

        The default value is '"' (quotation mark).

        Double the character to place it into quoted text.

        Returns:
        The character that is used to quote field values.
      • setQuoteChar

        public void setQuoteChar(char value)
        Sets the character that is used to quote field values.

        The default value is '"' (quotation mark).

        Double the character to place it into quoted text.

        Parameters:
        value - The character that is used to quote field values.
      • getCommentChar

        public char getCommentChar()
        Gets the character that is used to comment lines of CSV data. The default value is '#' (number sign).
        Returns:
        The character that is used to comment lines of CSV data.
      • setCommentChar

        public void setCommentChar(char value)
        Sets the character that is used to comment lines of CSV data. The default value is '#' (number sign).
        Parameters:
        value - The character that is used to comment lines of CSV data.