code: private boolean refill() throws IOException {
      if (!byteBuffer.hasRemaining()) {
        byteBuffer.clear();
        int nRead = 0;
        while (nRead == 0) {
          nRead = fileChannel.read(byteBuffer);
        }
        if (nRead < 0) {
          return false;
        }
        byteBuffer.flip();
      }
      return true;
    }
docs: Checks weather data is left to be read from the input stream.
  @return true if data is left, false otherwise
  @throws IOException