- 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.SerializableIndex built byIndexedCsvReaderto access large CSV data files.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classCsvIndex.CsvPage
-
Field Summary
Fields Modifier and Type Field Description private intbomHeaderLengthThe length of an optional BOM header.private bytecommentCharacterThe comment character used when building this index.private CommentStrategycommentStrategyThe comment strategy used when building this index.private bytefieldSeparatorThe field separator used when building this index.private longfileSizeThe CSV file size this index was built for.private java.util.List<CsvIndex.CsvPage>pagesThe pages this index is partitioned.private bytequoteCharacterThe quote character used when building this index.private longrecordCounterThe total number of records the CSV file contains this index was built for.private static longserialVersionUID
-
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 booleanequals(java.lang.Object o)(package private) intgetBomHeaderLength()(package private) bytegetCommentCharacter()(package private) CommentStrategygetCommentStrategy()(package private) bytegetFieldSeparator()(package private) longgetFileSize()(package private) CsvIndex.CsvPagegetPage(int pageNumber)intgetPageCount()Gets the number of pages the file contents is partitioned to.(package private) bytegetQuoteCharacter()longgetRecordCount()Gets the number of records the file contains.inthashCode()java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-