code: protected void reBuffer() {
          resetBuffer();
  
          try {
              if (bufferOffset >= fs.getFileStatus(inputPath).getLen()) // TODO: is this equivalent?
                  return;
  
              input.seek(bufferOffset);
  
              int read = 0;
  
              while (read < buffer.length) {
                  int n = input.read(buffer, read, buffer.length - read);
                  if (n < 0)
                      break;
                  read += n;
              }
  
              validBufferBytes = read;
              bytesSinceCacheFlush += read;
          } catch (IOException e) {
              throw new FSReadError(e, filePath);
          }
      }
docs: Read data from file starting from current currentOffset to populate buffer.