public class FileUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
read(java.nio.file.Path p)
Reads the specified file to a string.
|
static void |
write(java.nio.file.Path p,
java.lang.String s)
Writes the specified string to a file.
|
public static void write(java.nio.file.Path p,
java.lang.String s)
throws java.io.IOException
p - file destination (existing files will be overwritten)s - string to savejava.io.IOException - if writing to file failspublic static java.lang.String read(java.nio.file.Path p)
throws java.io.IOException
p - file to readjava.io.IOException - if reading from file failed