@Override
  public @NotNull InputStream getInputStream(@NotNull VirtualFile file) throws IOException {
    InputStream contentStream;
    boolean useReplicator = false;
    long len = 0L;

    myInputLock.readLock().lock();
    try {
      long storedLength = getLengthIfUpToDate(file);
      boolean mustReloadLength = storedLength == -1;

      if (mustReloadLength
          || mustReloadContent(file)
          || FileUtilRt.isTooLarge(file.getLength())
          || (contentStream = readContent(file)) == null) {
        NewVirtualFileSystem fs = getFileSystem(file);
        len = mustReloadLength ? reloadLengthFromFS(file, fs) : storedLength;
        contentStream = fs.getInputStream(file);

        if (shouldCache(len)) {
          useReplicator = true;
        }
      }
    }
    finally {
      myInputLock.readLock().unlock();
    }

    if (useReplicator) {
      contentStream = createReplicatorAndStoreContent(file, contentStream, len);
    }

    return contentStream;
  }
@Override
  public @NotNull InputStream getInputStream(@NotNull VirtualFile file)