public class IOUtils
extends java.lang.Object
Constructor and Description |
---|
IOUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
eachFile(java.net.URI uri,
java.lang.String path,
java.util.function.Consumer<java.nio.file.Path> consumer)
Iterates over each directory in a JAR or file system.
|
static void |
eachFile(java.net.URL url,
java.lang.String path,
java.util.function.Consumer<java.nio.file.Path> consumer)
Iterates over each directory in a JAR or file system.
|
static java.lang.String |
readText(java.io.BufferedReader reader)
Read the content of the BufferedReader and return it as a String in a blocking manner.
|
public static void eachFile(@NonNull java.net.URL url, java.lang.String path, @NonNull java.util.function.Consumer<java.nio.file.Path> consumer)
url
- The URLpath
- The pathconsumer
- The consumerpublic static void eachFile(@NonNull java.net.URI uri, java.lang.String path, @NonNull java.util.function.Consumer<java.nio.file.Path> consumer)
uri
- The URIpath
- The pathconsumer
- The consumerpublic static java.lang.String readText(java.io.BufferedReader reader) throws java.io.IOException
reader
- a BufferedReader whose content we want to readjava.io.IOException
- if an IOException occurs.