- java.lang.Object
-
- de.siegmar.fastcsv.reader.CsvIndex
-
- All Implemented Interfaces:
java.io.Serializable
public final class CsvIndex extends java.lang.Object implements java.io.Serializable
Index built byIndexedCsvReader
to access large CSV data files.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
CsvIndex.CsvPage
-
Field Summary
Fields Modifier and Type Field Description private int
bomHeaderLength
The length of an optional BOM header.private byte
commentCharacter
The comment character used when building this index.private CommentStrategy
commentStrategy
The comment strategy used when building this index.private byte
fieldSeparator
The field separator used when building this index.private long
fileSize
The CSV file size this index was built for.private java.util.List<CsvIndex.CsvPage>
pages
The pages this index is partitioned.private byte
quoteCharacter
The quote character used when building this index.private long
recordCounter
The total number of records the CSV file contains this index was built for.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description CsvIndex(int bomHeaderLength, long fileSize, byte fieldSeparator, byte quoteCharacter, CommentStrategy commentStrategy, byte commentCharacter, long recordCounter, java.util.List<CsvIndex.CsvPage> pages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
(package private) int
getBomHeaderLength()
(package private) byte
getCommentCharacter()
(package private) CommentStrategy
getCommentStrategy()
(package private) byte
getFieldSeparator()
(package private) long
getFileSize()
(package private) CsvIndex.CsvPage
getPage(int pageNumber)
int
getPageCount()
Gets the number of pages the file contents is partitioned to.(package private) byte
getQuoteCharacter()
long
getRecordCount()
Gets the number of records the file contains.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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()
-
getCommentStrategy
CommentStrategy getCommentStrategy()
-
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
-
getPage
CsvIndex.CsvPage getPage(int pageNumber)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-