IndexedCsvReader to access large CSV data files.
Even if the constructor is public (mandatory for record classes), this class is not intended to be instantiated directly!
| Modifier and Type | Class and Description |
|---|---|
| public static record | CsvIndex.
Represents a page of the CSV file. |
| Modifier and Type | Field and Description |
|---|---|
| private final int | bomHeaderLength
Record Component accessed by bomHeaderLength(). The length of an optional BOM header. |
| private final byte | commentCharacter
Record Component accessed by commentCharacter(). The comment character used when building this index. |
| private final CommentStrategy | commentStrategy
Record Component accessed by commentStrategy(). The comment strategy used when building this index. |
| private final byte | fieldSeparator
Record Component accessed by fieldSeparator(). The field separator used when building this index. |
| private final long | fileSize
Record Component accessed by fileSize(). The CSV file size this index was built for. |
| private final List | |
| private final byte | quoteCharacter
Record Component accessed by quoteCharacter(). The quote character used when building this index. |
| private final long | recordCount
Record Component accessed by recordCount(). The total number of records the CSV file contains this index was built for. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | bomHeaderLength()
Record Component getter of bomHeaderLength.
Record Component The length of an optional BOM header. |
| public byte | commentCharacter()
Record Component getter of commentCharacter.
Record Component The comment character used when building this index. |
| public CommentStrategy | commentStrategy()
Record Component getter of commentStrategy.
Record Component The comment strategy used when building this index. |
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public byte | fieldSeparator()
Record Component getter of fieldSeparator.
Record Component The field separator used when building this index. |
| public long | |
| public final int | |
| public List | |
| public byte | quoteCharacter()
Record Component getter of quoteCharacter.
Record Component The quote character used when building this index. |
| public long | recordCount()
Record Component getter of recordCount.
Record Component The total number of records the CSV file contains this index was built for. |
| public String | Returns: string representation of this index without the pages themselvesImplements abstract java. Returns string representation of this index without the pages themselves. |
| bomHeaderLength | back to summary |
|---|---|
| private final int bomHeaderLength Record Component accessed by bomHeaderLength(). The length of an optional BOM header. | |
| commentCharacter | back to summary |
|---|---|
| private final byte commentCharacter Record Component accessed by commentCharacter(). The comment character used when building this index. | |
| commentStrategy | back to summary |
|---|---|
| private final CommentStrategy commentStrategy Record Component accessed by commentStrategy(). The comment strategy used when building this index. | |
| fieldSeparator | back to summary |
|---|---|
| private final byte fieldSeparator Record Component accessed by fieldSeparator(). The field separator used when building this index. | |
| fileSize | back to summary |
|---|---|
| private final long fileSize Record Component accessed by fileSize(). The CSV file size this index was built for. | |
| pages | back to summary |
|---|---|
| private final List<CsvIndex. Record Component accessed by pages(). The pages this index is partitioned. | |
| quoteCharacter | back to summary |
|---|---|
| private final byte quoteCharacter Record Component accessed by quoteCharacter(). The quote character used when building this index. | |
| recordCount | back to summary |
|---|---|
| private final long recordCount Record Component accessed by recordCount(). The total number of records the CSV file contains this index was built for. | |
| CsvIndex | back to summary |
|---|---|
| public CsvIndex(final int bomHeaderLength, final long fileSize, final byte fieldSeparator, final byte quoteCharacter, final CommentStrategy commentStrategy, final byte commentCharacter, final long recordCount, final List<CsvIndex. Constructor for the
| |
| bomHeaderLength | back to summary |
|---|---|
| public int bomHeaderLength() Record Component getter of bomHeaderLength.
| |
| commentCharacter | back to summary |
|---|---|
| public byte commentCharacter() Record Component getter of commentCharacter.
| |
| commentStrategy | back to summary |
|---|---|
| public CommentStrategy commentStrategy() Record Component getter of commentStrategy.
| |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| fieldSeparator | back to summary |
|---|---|
| public byte fieldSeparator() Record Component getter of fieldSeparator.
| |
| fileSize | back to summary |
|---|---|
| public long fileSize() Record Component getter of fileSize.
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| pages | back to summary |
|---|---|
| public List Record Component getter of pages.
| |
| quoteCharacter | back to summary |
|---|---|
| public byte quoteCharacter() Record Component getter of quoteCharacter.
| |
| recordCount | back to summary |
|---|---|
| public long recordCount() Record Component getter of recordCount.
| |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract java. Returns string representation of this index without the pages themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final long | startingLineNumber
Record Component accessed by startingLineNumber(). The starting line number of the page. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public long | |
| public long | startingLineNumber()
Record Component getter of startingLineNumber.
Record Component The starting line number of the page. |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| offset | back to summary |
|---|---|
| private final long offset Record Component accessed by offset(). The offset of the page in the CSV file. | |
| startingLineNumber | back to summary |
|---|---|
| private final long startingLineNumber Record Component accessed by startingLineNumber(). The starting line number of the page. | |
| CsvPage | back to summary |
|---|---|
| public CsvPage(long offset, long startingLineNumber) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| offset | back to summary |
|---|---|
| public long offset() Record Component getter of offset.
| |
| startingLineNumber | back to summary |
|---|---|
| public long startingLineNumber() Record Component getter of startingLineNumber.
| |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |