本文整理了Java中org.uberfire.java.nio.file.NoSuchFileException.<init>()
方法的一些代码示例,展示了NoSuchFileException.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchFileException.<init>()
方法的具体详情如下:
包路径:org.uberfire.java.nio.file.NoSuchFileException
类名称:NoSuchFileException
方法名:<init>
暂无
代码示例来源: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: 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
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: 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/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: 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.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);
}
代码示例来源:origin: kiegroup/appformer
public static Path setOwner(final Path path,
final UserPrincipal owner)
throws UnsupportedOperationException, IOException, SecurityException {
checkNotNull("path",
path);
checkNotNull("owner",
owner);
if (notExists(path)) {
throw new NoSuchFileException(path.toString());
}
throw new UnsupportedOperationException("feature not available");
}
代码示例来源:origin: org.uberfire/vfs-api
public static Path setOwner(final Path path, final UserPrincipal owner)
throws UnsupportedOperationException, IOException, SecurityException {
checkNotNull("path", path);
checkNotNull("owner", owner);
if (notExists(path)) {
throw new NoSuchFileException(path.toString());
}
throw new UnsupportedOperationException("feature not available");
}
代码示例来源:origin: kiegroup/appformer
public static Path setPosixFilePermissions(final Path path,
final Set<PosixFilePermission> perms)
throws UnsupportedOperationException, ClassCastException, IOException, SecurityException {
checkNotNull("path",
path);
checkNotNull("perms",
perms);
if (notExists(path)) {
throw new NoSuchFileException(path.toString());
}
throw new UnsupportedOperationException("feature not available");
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
@Test
public void testAcceptWithNoSuchFileException() {
doThrow(new NoSuchFileException()).when(path).getFileName();
assertFalse(observer.accept(path));
}
}
代码示例来源:origin: org.uberfire/vfs-jgit
@Override
public void checkAccess(final Path path, final AccessMode... modes)
throws UnsupportedOperationException, NoSuchFileException, AccessDeniedException, IOException, SecurityException {
checkNotNull("path", path);
final JGitPathImpl gPath = toPathImpl(path);
final Pair<PathType, ObjectId> result = checkPath(gPath.getFileSystem().gitRepo(), gPath.getRefTree(), gPath.getPath());
if (result.getK1().equals(NOT_FOUND)) {
throw new NoSuchFileException(path.toString());
}
}
代码示例来源:origin: org.uberfire/uberfire-backend-server
@Test
public void retrieveLockInfoNoSuchFileException() {
when(ioService.exists(any(org.uberfire.java.nio.file.Path.class))).thenReturn(true);
when(ioService.readAllString(any(org.uberfire.java.nio.file.Path.class))).thenThrow(new NoSuchFileException());
final LockInfo info = lockService.retrieveLockInfo(path);
assertFalse(info.isLocked());
assertNull(info.lockedBy());
}
代码示例来源:origin: kiegroup/appformer
@Test
public void retrieveLockInfoNoSuchFileException() {
when(ioService.exists(any(org.uberfire.java.nio.file.Path.class))).thenReturn(true);
when(ioService.readAllString(any(org.uberfire.java.nio.file.Path.class))).thenThrow(new NoSuchFileException());
final LockInfo info = lockService.retrieveLockInfo(path);
assertFalse(info.isLocked());
assertNull(info.lockedBy());
}
代码示例来源:origin: org.uberfire/vfs-jgit
public void deleteBranch(final JGitPathImpl path) {
final Ref branch = getBranch(path.getFileSystem().gitRepo(), path.getRefTree());
if (branch == null) {
throw new NoSuchFileException(path.toString());
}
JGitUtil.deleteBranch(path.getFileSystem().gitRepo(), branch);
}
代码示例来源:origin: kiegroup/appformer
public void deleteBranch(final JGitPathImpl path) {
final Ref branch = path.getFileSystem().getGit().getRef(path.getRefTree());
if (branch == null) {
throw new NoSuchFileException(path.toString());
}
try {
path.getFileSystem().lock();
path.getFileSystem().getGit().deleteRef(branch);
} finally {
path.getFileSystem().unlock();
}
}
内容来源于网络,如有侵权,请联系作者删除!