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