String getPageText(long pageNumber) throws IOException {
    randomAccessFileLock.lock();
    try {
      long pagesAmount = getPagesAmount();
      if (pageNumber < 0 || pageNumber >= pagesAmount) {
        return null;
      }

      long minProbStartPos;
      long startByte;
      long endByte;

      minProbStartPos = pageNumber * pageSize;
      if (pageNumber == 0) {
        startByte = 0;
      }
      else {
        startByte = minProbStartPos + findPageShiftFrom(minProbStartPos, randomAccessFile, vFile.getCharset(), maxPageBorderShift);
      }

      if (startByte > randomAccessFile.length() - 1) {
        return "";  // situation, when penultimate page overlaps the last page completely
      }

      minProbStartPos += pageSize;
      if (minProbStartPos >= randomAccessFile.length()) {
        endByte = randomAccessFile.length();
      }
      else {
        endByte = minProbStartPos + findPageShiftFrom(minProbStartPos, randomAccessFile, vFile.getCharset(), maxPageBorderShift);
      }

      randomAccessFile.seek(startByte);
      byte[] buffer = new byte[(int)(endByte - startByte)]; // difference should be a value near pageSize, so it is less than maxInteger
      randomAccessFile.readFully(buffer);
      return CharsetToolkit.decodeString(buffer, vFile.getCharset());
    }
    finally {
      randomAccessFileLock.unlock();
    }
  }
String getPageText(long pageNumber)