long getFileSize() throws IOException {
    if (randomAccessFileLock.isHeldByCurrentThread()) {
      cashedFileSize = randomAccessFile.length();
    }
    else {
      if (randomAccessFileLock.tryLock()) {
        try {
          cashedFileSize = randomAccessFile.length();
        }
        finally {
          randomAccessFileLock.unlock();
        }
      }
      else {
        if (cashedFileSize == UNDEFINED) {
          randomAccessFileLock.lock();
          try {
            cashedFileSize = randomAccessFile.length();
          }
          finally {
            randomAccessFileLock.unlock();
          }
        }
      }
    }
    return cashedFileSize;
  }
long getFileSize()