final long end = start + split.getLength();
// open the file and seek to the start of the split
final NFSDataInputStream in =
new NFSDataInputStream(split.getFileSystem().open(split.getFile()));
in.seek(start);
if (start != 0) {
while (in.getPos() < end) { // scan to the next newline in the file
char c = (char)in.read(); // bug: this assumes eight-bit characters.
if (c == '\r' || c == '\n') {