@NotNull
  public static InputStream getFileInputStream(@NotNull VirtualFile file) throws IOException {
    VirtualFileSystem fs = file.getFileSystem();
    if (fs instanceof FileSystemInterface) {
      return ((FileSystemInterface)fs).getInputStream(file);
    }
    // can't use VirtualFile.getInputStream here, as it will strip BOM
    byte[] content = ReadAction.compute(() -> file.contentsToByteArray());
    return new ByteArrayInputStream(content);
  }
@NotNull
  public static InputStream getFileInputStream(@NotNull VirtualFile file)