org.uberfire.java.nio.file.NoSuchFileException类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.uberfire.java.nio.file.NoSuchFileException类的一些代码示例,展示了NoSuchFileException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchFileException类的具体详情如下:
包路径:org.uberfire.java.nio.file.NoSuchFileException
类名称:NoSuchFileException

NoSuchFileException介绍

暂无

代码示例

代码示例来源:origin: org.uberfire/vfs-api

public static String probeContentType(final Path path)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path", path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  if (!isRegularFile(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: kiegroup/appformer

@Override
public Map<String, String> loadDefaultEditorsMap() {
  final Map<String, String> map = new HashMap<String, String>();
  try {
    final Path path = getPathToDefaultEditors();
    if (ioService.exists(path)) {
      for (String line : ioService.readAllLines(path)) {
        if (!line.trim().startsWith("#")) {
          String[] split = line.split("=");
          map.put(split[0],
              split[1]);
        }
      }
    }
    return map;
  } catch (final NoSuchFileException e) {
    e.printStackTrace();
    return map;
  }
}

代码示例来源:origin: org.uberfire/uberfire-widgets-commons

ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionInvalidPath());
} catch (org.uberfire.java.nio.file.NoSuchFileException e) {
  ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionNoSuchFile0(e.getFile()));
} catch (org.uberfire.java.nio.file.NotDirectoryException e) {
  ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionGeneric0(e.getMessage()));

代码示例来源:origin: kiegroup/appformer

ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionInvalidPath());
} catch (org.uberfire.java.nio.file.NoSuchFileException e) {
  ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionNoSuchFile0(e.getFile()));
} catch (org.uberfire.java.nio.file.NotDirectoryException e) {
  ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionGeneric0(e.getMessage()));

代码示例来源:origin: org.uberfire/uberfire-nio2-api

public static String probeContentType(final Path path)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  if (!isRegularFile(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: kiegroup/appformer

public static String probeContentType(final Path path)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  if (!isRegularFile(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: org.uberfire/uberfire-nio2-api

public static Set<PosixFilePermission> getPosixFilePermissions(final Path path,
                                final LinkOption... options)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: org.uberfire/uberfire-nio2-api

public static UserPrincipal getOwner(final Path path,
                   final LinkOption... options)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: org.uberfire/vfs-fs

@Override
public InputStream newInputStream(final Path path, final OpenOption... options)
    throws IllegalArgumentException, NoSuchFileException, IOException, SecurityException {
  checkNotNull("path", path);
  final File file = path.toFile();
  if (!file.exists()) {
    throw new NoSuchFileException(file.toString());
  }
  try {
    return new FileInputStream(path.toFile());
  } catch (FileNotFoundException e) {
    throw new NoSuchFileException(e.getMessage());
  }
}

代码示例来源:origin: org.uberfire/vfs-api

public static UserPrincipal getOwner(final Path path, final LinkOption... options)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path", path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: kiegroup/appformer

public static UserPrincipal getOwner(final Path path,
                   final LinkOption... options)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: org.uberfire/uberfire-nio2-fs

@Override
public InputStream newInputStream(final Path path,
                 final OpenOption... options)
    throws IllegalArgumentException, NoSuchFileException, IOException, SecurityException {
  checkNotNull("path",
         path);
  final File file = path.toFile();
  if (!file.exists()) {
    throw new NoSuchFileException(file.toString());
  }
  try {
    return new FileInputStream(path.toFile());
  } catch (FileNotFoundException e) {
    throw new NoSuchFileException(e.getMessage());
  }
}

代码示例来源:origin: kiegroup/appformer

@Override
public InputStream newInputStream(final Path path,
                 final OpenOption... options)
    throws IllegalArgumentException, NoSuchFileException, IOException, SecurityException {
  checkNotNull("path",
         path);
  final File file = path.toFile();
  if (!file.exists()) {
    throw new NoSuchFileException(file.toString());
  }
  try {
    return new FileInputStream(path.toFile());
  } catch (FileNotFoundException e) {
    throw new NoSuchFileException(e.getMessage());
  }
}

代码示例来源:origin: org.uberfire/vfs-api

public static Set<PosixFilePermission> getPosixFilePermissions(final Path path, final LinkOption... options)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path", path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: kiegroup/appformer

public static Set<PosixFilePermission> getPosixFilePermissions(final Path path,
                                final LinkOption... options)
    throws UnsupportedOperationException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (notExists(path)) {
    throw new NoSuchFileException(path.toString());
  }
  throw new UnsupportedOperationException("feature not available");
}

代码示例来源:origin: org.uberfire/uberfire-services-backend

@Override
  public String answer(InvocationOnMock invocation) throws Throwable {
    if (!exists.get()) {
      throw new NoSuchFileException();
    }
    return "content";
  }
});

代码示例来源:origin: kiegroup/appformer

@Override
  public String answer(InvocationOnMock invocation) throws Throwable {
    if (!exists.get()) {
      throw new NoSuchFileException();
    }
    return "content";
  }
});

代码示例来源:origin: org.guvnor/guvnor-services-backend

@Override
  public String answer(InvocationOnMock invocation) throws Throwable {
    if (!exists.get()) {
      throw new NoSuchFileException();
    }
    return "content";
  }
});

代码示例来源:origin: org.uberfire/uberfire-nio2-fs

@Override
public void delete(final Path path,
          final DeleteOption... options) throws NoSuchFileException, DirectoryNotEmptyException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (!path.toFile().exists()) {
    throw new NoSuchFileException(path.toString());
  }
  deleteIfExists(path,
          options);
}

代码示例来源:origin: kiegroup/appformer

@Override
public void delete(final Path path,
          final DeleteOption... options) throws NoSuchFileException, DirectoryNotEmptyException, IOException, SecurityException {
  checkNotNull("path",
         path);
  if (!path.toFile().exists()) {
    throw new NoSuchFileException(path.toString());
  }
  deleteIfExists(path,
          options);
}

相关文章

NoSuchFileException类方法