public class IOUtils
extends java.lang.Object
| Constructor and Description |
|---|
IOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
readFile(java.lang.String path)
Reads an entire file into a String
|
static void |
writeFile(java.lang.String path,
java.lang.String content,
boolean append)
Writes a String to a file
|
public static java.lang.String readFile(java.lang.String path)
throws java.io.IOException
path - The file pathjava.io.IOException - if reading the file failspublic static void writeFile(java.lang.String path,
java.lang.String content,
boolean append)
throws java.io.IOException
path - The file pathcontent - The String to write to the fileappend - Whether to append rather than overwritingjava.io.IOException - if writing to the file fails