Class CsvIndex

  • All Implemented Interfaces:
    java.io.Serializable

    public final class CsvIndex
    extends java.lang.Object
    implements java.io.Serializable
    Index built by IndexedCsvReader to access large CSV data files.
    See Also:
    Serialized Form
    • Field Detail

      • bomHeaderLength

        private final int bomHeaderLength
        The length of an optional BOM header.
      • fileSize

        private final long fileSize
        The CSV file size this index was built for.
      • fieldSeparator

        private final byte fieldSeparator
        The field separator used when building this index.
      • quoteCharacter

        private final byte quoteCharacter
        The quote character used when building this index.
      • commentStrategy

        private final CommentStrategy commentStrategy
        The comment strategy used when building this index.
      • commentCharacter

        private final byte commentCharacter
        The comment character used when building this index.
      • recordCounter

        private final long recordCounter
        The total number of records the CSV file contains this index was built for.
      • pages

        private final java.util.List<CsvIndex.CsvPage> pages
        The pages this index is partitioned.
    • Constructor Detail

      • CsvIndex

        CsvIndex​(int bomHeaderLength,
                 long fileSize,
                 byte fieldSeparator,
                 byte quoteCharacter,
                 CommentStrategy commentStrategy,
                 byte commentCharacter,
                 long recordCounter,
                 java.util.List<CsvIndex.CsvPage> pages)
    • Method Detail

      • getBomHeaderLength

        int getBomHeaderLength()
      • getFileSize

        long getFileSize()
      • getFieldSeparator

        byte getFieldSeparator()
      • getQuoteCharacter

        byte getQuoteCharacter()
      • getCommentCharacter

        byte getCommentCharacter()
      • getPageCount

        public int getPageCount()
        Gets the number of pages the file contents is partitioned to.
        Returns:
        the number of pages the file contents is partitioned to
      • getRecordCount

        public long getRecordCount()
        Gets the number of records the file contains.
        Returns:
        the number of records the file contains
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object