Class FilesUncheck
- java.lang.Object
-
- org.apache.commons.io.file.FilesUncheck
-
public final class FilesUncheck extends java.lang.ObjectDelegates toFilesto uncheck calls by throwingUncheckedIOExceptioninstead ofIOException.- Since:
- 2.12.0
- See Also:
Files,IOException,UncheckedIOException
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longcopy(java.io.InputStream in, java.nio.file.Path target, java.nio.file.CopyOption... options)Delegates toFiles.copy(InputStream, Path, CopyOption...)throwingUncheckedIOExceptioninstead ofIOException.static longcopy(java.nio.file.Path source, java.io.OutputStream out)Delegates toFiles.copy(Path, OutputStream)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.Pathcopy(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)Delegates toFiles.copy(Path, Path, CopyOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateDirectories(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createDirectories(Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateDirectory(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createDirectory(Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateFile(java.nio.file.Path path, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createFile(Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateLink(java.nio.file.Path link, java.nio.file.Path existing)Delegates toFiles.createLink(Path, Path)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateSymbolicLink(java.nio.file.Path link, java.nio.file.Path target, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createSymbolicLink(Path, Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateTempDirectory(java.lang.String prefix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempDirectory(String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateTempDirectory(java.nio.file.Path dir, java.lang.String prefix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempDirectory(Path, String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateTempFile(java.lang.String prefix, java.lang.String suffix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempFile(String, String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathcreateTempFile(java.nio.file.Path dir, java.lang.String prefix, java.lang.String suffix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempFile(Path, String, String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static voiddelete(java.nio.file.Path path)Delegates toFiles.delete(Path)throwingUncheckedIOExceptioninstead ofIOException.static booleandeleteIfExists(java.nio.file.Path path)Delegates toFiles.deleteIfExists(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.util.stream.Stream<java.nio.file.Path>find(java.nio.file.Path start, int maxDepth, java.util.function.BiPredicate<java.nio.file.Path,java.nio.file.attribute.BasicFileAttributes> matcher, java.nio.file.FileVisitOption... options)Delegates toFiles.find(Path, int, BiPredicate, FileVisitOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.lang.ObjectgetAttribute(java.nio.file.Path path, java.lang.String attribute, java.nio.file.LinkOption... options)Delegates toFiles.getAttribute(Path, String, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.FileStoregetFileStore(java.nio.file.Path path)Delegates toFiles.getFileStore(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.attribute.FileTimegetLastModifiedTime(java.nio.file.Path path, java.nio.file.LinkOption... options)Delegates toFiles.getLastModifiedTime(Path, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.attribute.UserPrincipalgetOwner(java.nio.file.Path path, java.nio.file.LinkOption... options)Delegates toFiles.getOwner(Path, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.util.Set<java.nio.file.attribute.PosixFilePermission>getPosixFilePermissions(java.nio.file.Path path, java.nio.file.LinkOption... options)Delegates toFiles.getPosixFilePermissions(Path, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static booleanisHidden(java.nio.file.Path path)Delegates toFiles.isHidden(Path)throwingUncheckedIOExceptioninstead ofIOException.static booleanisSameFile(java.nio.file.Path path, java.nio.file.Path path2)Delegates toFiles.isSameFile(Path, Path)throwingUncheckedIOExceptioninstead ofIOException.static java.util.stream.Stream<java.lang.String>lines(java.nio.file.Path path)Delegates toFiles.lines(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.util.stream.Stream<java.lang.String>lines(java.nio.file.Path path, java.nio.charset.Charset cs)Delegates toFiles.lines(Path, Charset)throwingUncheckedIOExceptioninstead ofIOException.static java.util.stream.Stream<java.nio.file.Path>list(java.nio.file.Path dir)Delegates toFiles.list(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.Pathmove(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)Delegates toFiles.move(Path, Path, CopyOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.io.BufferedReadernewBufferedReader(java.nio.file.Path path)Delegates toFiles.newBufferedReader(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.io.BufferedReadernewBufferedReader(java.nio.file.Path path, java.nio.charset.Charset cs)Delegates toFiles.newBufferedReader(Path, Charset)throwingUncheckedIOExceptioninstead ofIOException.static java.io.BufferedWriternewBufferedWriter(java.nio.file.Path path, java.nio.charset.Charset cs, java.nio.file.OpenOption... options)Delegates toFiles.newBufferedWriter(Path, Charset, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.io.BufferedWriternewBufferedWriter(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newBufferedWriter(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.channels.SeekableByteChannelnewByteChannel(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newByteChannel(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.channels.SeekableByteChannelnewByteChannel(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.newByteChannel(Path, Set, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.DirectoryStream<java.nio.file.Path>newDirectoryStream(java.nio.file.Path dir)Delegates toFiles.newDirectoryStream(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.DirectoryStream<java.nio.file.Path>newDirectoryStream(java.nio.file.Path dir, java.lang.String glob)Delegates toFiles.newDirectoryStream(Path, String)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.DirectoryStream<java.nio.file.Path>newDirectoryStream(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)Delegates toFiles.newDirectoryStream(Path, java.nio.file.DirectoryStream.Filter)throwingUncheckedIOExceptioninstead ofIOException.static java.io.InputStreamnewInputStream(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newInputStream(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.io.OutputStreamnewOutputStream(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newOutputStream(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.lang.StringprobeContentType(java.nio.file.Path path)Delegates toFiles.probeContentType(Path)throwingUncheckedIOExceptioninstead ofIOException.static byte[]readAllBytes(java.nio.file.Path path)Delegates toFiles.readAllBytes(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.util.List<java.lang.String>readAllLines(java.nio.file.Path path)Delegates toFiles.readAllLines(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.util.List<java.lang.String>readAllLines(java.nio.file.Path path, java.nio.charset.Charset cs)Delegates toFiles.readAllLines(Path, Charset)throwingUncheckedIOExceptioninstead ofIOException.static <A extends java.nio.file.attribute.BasicFileAttributes>
AreadAttributes(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options)Delegates toFiles.readAttributes(Path, Class, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.util.Map<java.lang.String,java.lang.Object>readAttributes(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options)Delegates toFiles.readAttributes(Path, String, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathreadSymbolicLink(java.nio.file.Path link)Delegates toFiles.readSymbolicLink(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathsetAttribute(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options)Delegates toFiles.setAttribute(Path, String, Object, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathsetLastModifiedTime(java.nio.file.Path path, java.nio.file.attribute.FileTime time)Delegates toFiles.setLastModifiedTime(Path, FileTime)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathsetOwner(java.nio.file.Path path, java.nio.file.attribute.UserPrincipal owner)Delegates toFiles.setOwner(Path, UserPrincipal)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathsetPosixFilePermissions(java.nio.file.Path path, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms)Delegates toFiles.setPosixFilePermissions(Path, Set)throwingUncheckedIOExceptioninstead ofIOException.static longsize(java.nio.file.Path path)Delegates toFiles.size(Path)throwingUncheckedIOExceptioninstead ofIOException.static java.util.stream.Stream<java.nio.file.Path>walk(java.nio.file.Path start, int maxDepth, java.nio.file.FileVisitOption... options)Delegates toFiles.walk(Path, int, FileVisitOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.util.stream.Stream<java.nio.file.Path>walk(java.nio.file.Path start, java.nio.file.FileVisitOption... options)Delegates toFiles.walk(Path, FileVisitOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathwalkFileTree(java.nio.file.Path start, java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)Delegates toFiles.walkFileTree(Path, FileVisitor)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.PathwalkFileTree(java.nio.file.Path start, java.util.Set<java.nio.file.FileVisitOption> options, int maxDepth, java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)Delegates toFiles.walkFileTree(Path, Set, int, FileVisitor)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.Pathwrite(java.nio.file.Path path, byte[] bytes, java.nio.file.OpenOption... options)Delegates toFiles.write(Path, byte[], OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.Pathwrite(java.nio.file.Path path, java.lang.Iterable<? extends java.lang.CharSequence> lines, java.nio.charset.Charset cs, java.nio.file.OpenOption... options)Delegates toFiles.write(Path, Iterable, Charset, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.static java.nio.file.Pathwrite(java.nio.file.Path path, java.lang.Iterable<? extends java.lang.CharSequence> lines, java.nio.file.OpenOption... options)Delegates toFiles.write(Path, Iterable, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.
-
-
-
Method Detail
-
copy
public static long copy(java.io.InputStream in, java.nio.file.Path target, java.nio.file.CopyOption... options)Delegates toFiles.copy(InputStream, Path, CopyOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
in- See delegate.target- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.- See Also:
Files.copy(InputStream, Path,CopyOption...)
-
copy
public static long copy(java.nio.file.Path source, java.io.OutputStream out)Delegates toFiles.copy(Path, OutputStream)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
source- See delegate. See delegate.out- See delegate. See delegate.- Returns:
- See delegate. See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
copy
public static java.nio.file.Path copy(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)Delegates toFiles.copy(Path, Path, CopyOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
source- See delegate.target- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createDirectories
public static java.nio.file.Path createDirectories(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createDirectories(Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
dir- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createDirectory
public static java.nio.file.Path createDirectory(java.nio.file.Path dir, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createDirectory(Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
dir- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createFile
public static java.nio.file.Path createFile(java.nio.file.Path path, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createFile(Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createLink
public static java.nio.file.Path createLink(java.nio.file.Path link, java.nio.file.Path existing)Delegates toFiles.createLink(Path, Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
link- See delegate.existing- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createSymbolicLink
public static java.nio.file.Path createSymbolicLink(java.nio.file.Path link, java.nio.file.Path target, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createSymbolicLink(Path, Path, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
link- See delegate.target- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createTempDirectory
public static java.nio.file.Path createTempDirectory(java.nio.file.Path dir, java.lang.String prefix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempDirectory(Path, String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
dir- See delegate.prefix- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createTempDirectory
public static java.nio.file.Path createTempDirectory(java.lang.String prefix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempDirectory(String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
prefix- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createTempFile
public static java.nio.file.Path createTempFile(java.nio.file.Path dir, java.lang.String prefix, java.lang.String suffix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempFile(Path, String, String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
dir- See delegate.prefix- See delegate.suffix- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
createTempFile
public static java.nio.file.Path createTempFile(java.lang.String prefix, java.lang.String suffix, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.createTempFile(String, String, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
prefix- See delegate.suffix- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
delete
public static void delete(java.nio.file.Path path)
Delegates toFiles.delete(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
deleteIfExists
public static boolean deleteIfExists(java.nio.file.Path path)
Delegates toFiles.deleteIfExists(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
find
public static java.util.stream.Stream<java.nio.file.Path> find(java.nio.file.Path start, int maxDepth, java.util.function.BiPredicate<java.nio.file.Path,java.nio.file.attribute.BasicFileAttributes> matcher, java.nio.file.FileVisitOption... options)Delegates toFiles.find(Path, int, BiPredicate, FileVisitOption...)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streamwraps aDirectoryStream. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed.- Parameters:
start- See delegate.maxDepth- See delegate.matcher- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.- Since:
- 2.14.0
-
getAttribute
public static java.lang.Object getAttribute(java.nio.file.Path path, java.lang.String attribute, java.nio.file.LinkOption... options)Delegates toFiles.getAttribute(Path, String, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.attribute- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
getFileStore
public static java.nio.file.FileStore getFileStore(java.nio.file.Path path)
Delegates toFiles.getFileStore(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
getLastModifiedTime
public static java.nio.file.attribute.FileTime getLastModifiedTime(java.nio.file.Path path, java.nio.file.LinkOption... options)Delegates toFiles.getLastModifiedTime(Path, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
getOwner
public static java.nio.file.attribute.UserPrincipal getOwner(java.nio.file.Path path, java.nio.file.LinkOption... options)Delegates toFiles.getOwner(Path, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
getPosixFilePermissions
public static java.util.Set<java.nio.file.attribute.PosixFilePermission> getPosixFilePermissions(java.nio.file.Path path, java.nio.file.LinkOption... options)Delegates toFiles.getPosixFilePermissions(Path, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
isHidden
public static boolean isHidden(java.nio.file.Path path)
Delegates toFiles.isHidden(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
isSameFile
public static boolean isSameFile(java.nio.file.Path path, java.nio.file.Path path2)Delegates toFiles.isSameFile(Path, Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.path2- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
lines
public static java.util.stream.Stream<java.lang.String> lines(java.nio.file.Path path)
Delegates toFiles.lines(Path)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streamwraps aReader. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed.- Parameters:
path- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
lines
public static java.util.stream.Stream<java.lang.String> lines(java.nio.file.Path path, java.nio.charset.Charset cs)Delegates toFiles.lines(Path, Charset)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streamwraps aReader. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed.- Parameters:
path- See delegate.cs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
list
public static java.util.stream.Stream<java.nio.file.Path> list(java.nio.file.Path dir)
Delegates toFiles.list(Path)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streamwraps aDirectoryStream. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed.- Parameters:
dir- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
move
public static java.nio.file.Path move(java.nio.file.Path source, java.nio.file.Path target, java.nio.file.CopyOption... options)Delegates toFiles.move(Path, Path, CopyOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
source- See delegate.target- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newBufferedReader
public static java.io.BufferedReader newBufferedReader(java.nio.file.Path path)
Delegates toFiles.newBufferedReader(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newBufferedReader
public static java.io.BufferedReader newBufferedReader(java.nio.file.Path path, java.nio.charset.Charset cs)Delegates toFiles.newBufferedReader(Path, Charset)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.cs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newBufferedWriter
public static java.io.BufferedWriter newBufferedWriter(java.nio.file.Path path, java.nio.charset.Charset cs, java.nio.file.OpenOption... options)Delegates toFiles.newBufferedWriter(Path, Charset, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.cs- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newBufferedWriter
public static java.io.BufferedWriter newBufferedWriter(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newBufferedWriter(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newByteChannel
public static java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newByteChannel(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newByteChannel
public static java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path path, java.util.Set<? extends java.nio.file.OpenOption> options, java.nio.file.attribute.FileAttribute<?>... attrs)Delegates toFiles.newByteChannel(Path, Set, FileAttribute...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.attrs- See delegate.- Returns:
- See delegate.
- Throws:
java.io.UncheckedIOException- Wraps anIOException.
-
newDirectoryStream
public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path dir)
Delegates toFiles.newDirectoryStream(Path)throwingUncheckedIOExceptioninstead ofIOException.If you don't use the try-with-resources construct, then you must call the stream's
BaseStream.close()method after iteration is complete to free any resources held for the open directory.- Parameters:
dir- See delegate.- Returns:
- See delegate.
-
newDirectoryStream
public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path dir, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path> filter)Delegates toFiles.newDirectoryStream(Path, java.nio.file.DirectoryStream.Filter)throwingUncheckedIOExceptioninstead ofIOException.If you don't use the try-with-resources construct, then you must call the stream's
BaseStream.close()method after iteration is complete to free any resources held for the open directory.- Parameters:
dir- See delegate.filter- See delegate.- Returns:
- See delegate.
-
newDirectoryStream
public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path dir, java.lang.String glob)Delegates toFiles.newDirectoryStream(Path, String)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streamwraps aDirectoryStream. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed.- Parameters:
dir- See delegate.glob- See delegate.- Returns:
- See delegate.
-
newInputStream
public static java.io.InputStream newInputStream(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newInputStream(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
-
newOutputStream
public static java.io.OutputStream newOutputStream(java.nio.file.Path path, java.nio.file.OpenOption... options)Delegates toFiles.newOutputStream(Path, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.options- See delegate.- Returns:
- See delegate.
-
probeContentType
public static java.lang.String probeContentType(java.nio.file.Path path)
Delegates toFiles.probeContentType(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
-
readAllBytes
public static byte[] readAllBytes(java.nio.file.Path path)
Delegates toFiles.readAllBytes(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
-
readAllLines
public static java.util.List<java.lang.String> readAllLines(java.nio.file.Path path)
Delegates toFiles.readAllLines(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
-
readAllLines
public static java.util.List<java.lang.String> readAllLines(java.nio.file.Path path, java.nio.charset.Charset cs)Delegates toFiles.readAllLines(Path, Charset)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.cs- See delegate.- Returns:
- See delegate.
-
readAttributes
public static <A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes(java.nio.file.Path path, java.lang.Class<A> type, java.nio.file.LinkOption... options)Delegates toFiles.readAttributes(Path, Class, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Type Parameters:
A- See delegate.- Parameters:
path- See delegate.type- See delegate.options- See delegate.- Returns:
- See delegate.
-
readAttributes
public static java.util.Map<java.lang.String,java.lang.Object> readAttributes(java.nio.file.Path path, java.lang.String attributes, java.nio.file.LinkOption... options)Delegates toFiles.readAttributes(Path, String, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.attributes- See delegate.options- See delegate.- Returns:
- See delegate.
-
readSymbolicLink
public static java.nio.file.Path readSymbolicLink(java.nio.file.Path link)
Delegates toFiles.readSymbolicLink(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
link- See delegate.- Returns:
- See delegate.
-
setAttribute
public static java.nio.file.Path setAttribute(java.nio.file.Path path, java.lang.String attribute, java.lang.Object value, java.nio.file.LinkOption... options)Delegates toFiles.setAttribute(Path, String, Object, LinkOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.attribute- See delegate.value- See delegate.options- See delegate.- Returns:
- See delegate.
-
setLastModifiedTime
public static java.nio.file.Path setLastModifiedTime(java.nio.file.Path path, java.nio.file.attribute.FileTime time)Delegates toFiles.setLastModifiedTime(Path, FileTime)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.time- See delegate.- Returns:
- See delegate.
-
setOwner
public static java.nio.file.Path setOwner(java.nio.file.Path path, java.nio.file.attribute.UserPrincipal owner)Delegates toFiles.setOwner(Path, UserPrincipal)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.owner- See delegate.- Returns:
- See delegate.
-
setPosixFilePermissions
public static java.nio.file.Path setPosixFilePermissions(java.nio.file.Path path, java.util.Set<java.nio.file.attribute.PosixFilePermission> perms)Delegates toFiles.setPosixFilePermissions(Path, Set)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.perms- See delegate.- Returns:
- See delegate.
-
size
public static long size(java.nio.file.Path path)
Delegates toFiles.size(Path)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.- Returns:
- See delegate.
-
walk
public static java.util.stream.Stream<java.nio.file.Path> walk(java.nio.file.Path start, java.nio.file.FileVisitOption... options)Delegates toFiles.walk(Path, FileVisitOption...)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streammay wrap one or moreDirectoryStreams. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed. Calling a closed stream causes aIllegalStateException.- Parameters:
start- See delegate.options- See delegate.- Returns:
- See delegate.
-
walk
public static java.util.stream.Stream<java.nio.file.Path> walk(java.nio.file.Path start, int maxDepth, java.nio.file.FileVisitOption... options)Delegates toFiles.walk(Path, int, FileVisitOption...)throwingUncheckedIOExceptioninstead ofIOException.The returned
Streammay wrap one or moreDirectoryStreams. When you require timely disposal of file system resources, use atry-with-resources block to ensure invocation of the stream'sBaseStream.close()method after the stream operations are completed. Calling a closed stream causes aIllegalStateException.- Parameters:
start- See delegate.maxDepth- See delegate.options- See delegate.- Returns:
- See delegate.
-
walkFileTree
public static java.nio.file.Path walkFileTree(java.nio.file.Path start, java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)Delegates toFiles.walkFileTree(Path, FileVisitor)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
start- See delegate.visitor- See delegate.- Returns:
- See delegate.
-
walkFileTree
public static java.nio.file.Path walkFileTree(java.nio.file.Path start, java.util.Set<java.nio.file.FileVisitOption> options, int maxDepth, java.nio.file.FileVisitor<? super java.nio.file.Path> visitor)Delegates toFiles.walkFileTree(Path, Set, int, FileVisitor)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
start- See delegate.options- See delegate.maxDepth- See delegate.visitor- See delegate.- Returns:
- See delegate.
-
write
public static java.nio.file.Path write(java.nio.file.Path path, byte[] bytes, java.nio.file.OpenOption... options)Delegates toFiles.write(Path, byte[], OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.bytes- See delegate.options- See delegate.- Returns:
- See delegate.
-
write
public static java.nio.file.Path write(java.nio.file.Path path, java.lang.Iterable<? extends java.lang.CharSequence> lines, java.nio.charset.Charset cs, java.nio.file.OpenOption... options)Delegates toFiles.write(Path, Iterable, Charset, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.lines- See delegate.cs- See delegate.options- See delegate.- Returns:
- See delegate.
-
write
public static java.nio.file.Path write(java.nio.file.Path path, java.lang.Iterable<? extends java.lang.CharSequence> lines, java.nio.file.OpenOption... options)Delegates toFiles.write(Path, Iterable, OpenOption...)throwingUncheckedIOExceptioninstead ofIOException.- Parameters:
path- See delegate.lines- See delegate.options- See delegate.- Returns:
- See delegate.
-
-