private class ReversedLinesFileReader.FilePart
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
private int |
currentLastBytePos |
|
private byte[] |
data |
|
private byte[] |
leftOver |
|
private long |
no |
| Modifier | Constructor | Description |
|---|---|---|
private |
FilePart(long no,
int length,
byte[] leftOverOfLastFilePart) |
ctor
|
| Modifier and Type | Method | Description |
|---|---|---|
private void |
createLeftOver() |
Creates the buffer containing any left over bytes.
|
private int |
getNewLineMatchByteCount(byte[] data,
int i) |
Finds the new-line sequence and return its length.
|
private java.lang.String |
readLine() |
Reads a line.
|
private ReversedLinesFileReader.FilePart |
rollOver() |
Handles block rollover
|
private final long no
private final byte[] data
private byte[] leftOver
private int currentLastBytePos
private FilePart(long no,
int length,
byte[] leftOverOfLastFilePart)
throws java.io.IOException
no - the part numberlength - its lengthleftOverOfLastFilePart - remainderjava.io.IOException - if there is a problem reading the fileprivate ReversedLinesFileReader.FilePart rollOver() throws java.io.IOException
java.io.IOException - if there was a problem reading the fileprivate java.lang.String readLine()
throws java.io.IOException
java.io.IOException - if there is an error reading from the fileprivate void createLeftOver()
private int getNewLineMatchByteCount(byte[] data,
int i)
data - buffer to scani - start offset in bufferCopyright (c) 2002-2017 Apache Software Foundation