本文整理了Java中org.uberfire.java.nio.file.Files.internalCopy()
方法的一些代码示例,展示了Files.internalCopy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Files.internalCopy()
方法的具体详情如下:
包路径:org.uberfire.java.nio.file.Files
类名称:Files
方法名:internalCopy
暂无
代码示例来源:origin: org.uberfire/vfs-api
public static long copy(final Path source, final OutputStream out)
throws IOException, SecurityException {
checkNotNull("source", source);
checkNotNull("out", out);
final InputStream in = newInputStream(source);
try {
return internalCopy(in, out);
} finally {
try {
in.close();
} catch (java.io.IOException e) {
throw new IOException(e);
}
}
}
代码示例来源:origin: kiegroup/appformer
public static long copy(final Path source,
final OutputStream out)
throws IOException, SecurityException {
checkNotNull("source",
source);
checkNotNull("out",
out);
final InputStream in = newInputStream(source);
try {
return internalCopy(in,
out);
} finally {
try {
in.close();
} catch (java.io.IOException e) {
throw new IOException(e);
}
}
}
代码示例来源:origin: org.uberfire/uberfire-nio2-api
public static long copy(final Path source,
final OutputStream out)
throws IOException, SecurityException {
checkNotNull("source",
source);
checkNotNull("out",
out);
final InputStream in = newInputStream(source);
try {
return internalCopy(in,
out);
} finally {
try {
in.close();
} catch (java.io.IOException e) {
throw new IOException(e);
}
}
}
代码示例来源:origin: org.uberfire/vfs-api
public static long copy(final InputStream in, final Path target, final CopyOption... options)
throws IOException, FileAlreadyExistsException, DirectoryNotEmptyException,
UnsupportedOperationException, SecurityException {
checkNotNull("in", in);
checkNotNull("target", target);
checkNotNull("options", options);
boolean replaceExisting = false;
for (final CopyOption opt : options) {
if (opt == StandardCopyOption.REPLACE_EXISTING) {
replaceExisting = true;
break;
} else {
checkNotNull("opt", opt);
throw new UnsupportedOperationException(opt + " not supported");
}
}
if (replaceExisting) {
deleteIfExists(target);
}
final OutputStream out = newOutputStream(target, StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE);
try {
return internalCopy(in, out);
} finally {
try {
out.close();
} catch (java.io.IOException e) {
throw new IOException(e);
}
}
}
代码示例来源:origin: org.uberfire/uberfire-nio2-api
return internalCopy(in,
out);
} finally {
代码示例来源:origin: kiegroup/appformer
return internalCopy(in,
out);
} finally {
内容来源于网络,如有侵权,请联系作者删除!