in src/main/java/com/microsoft/azure/datalake/store/ADLFileInputStream.java [306:325]
public void seek(long n) throws IOException, EOFException {
if (log.isTraceEnabled()) {
log.trace("ADLFileInputStream.seek({}) using client {} for file {}", n, client.getClientId(), filename);
}
if (streamClosed) throw new IOException("attempting to seek into a closed stream;");
if (n<0) throw new EOFException("Cannot seek to before the beginning of file");
if (n>directoryEntry.length) throw new EOFException("Cannot seek past end of file");
if (n>=fCursor-limit && n<=fCursor) { // within buffer
bCursor = (int) (n-(fCursor-limit));
return;
}
// next read will read from here
fCursor = n;
//invalidate buffer
limit = 0;
bCursor = 0;
}