public final class FileIOUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
content(java.io.File source)
Returns the content of the specified file.
|
static java.util.List<java.lang.String> |
lines(java.io.File source)
Returns the content of the specified file divided into lines.
|
static void |
write(java.io.File source,
java.lang.String content)
Writes data to the specified file.
|
public static final java.util.List<java.lang.String> lines(java.io.File source) throws java.io.IOException
source
- The file to read.java.io.IOException
- If any IO error occurs.content(File)
public static final java.lang.String content(java.io.File source) throws java.io.IOException
source
- The file to read.java.io.IOException
- If any IO error occurs.lines(File)
public static final void write(java.io.File source, java.lang.String content) throws java.io.IOException
source
- The file to write to.content
- The data to write to the file.java.io.IOException
- If any IO error occurs.