code: protected void reBuffer()
      {
          resetBuffer();
  
          try
          {
              int read = buffer.length;
              if (bufferOffset + read > fileLength)
              {
                  if (bufferOffset >= fileLength)
                      return;
                  read = (int) (fileLength - bufferOffset);
              }
  
              channel.position(bufferOffset); // setting channel position
  
              int offset = 0;
              while (read > 0)
              {
                  int n = super.read(buffer, offset, read);
                  if (n < 0)
                      throw new IllegalStateException();
                  read -= n;
                  offset += n;
              }
  
              validBufferBytes = offset;
          }
          catch (IOException e)
          {
              throw new FSReadError(e, filePath);
          }
      }
docs: Read data from file starting from current currentOffset to populate buffer.