public class FileReadWrite
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_ENCODING
Default file encoding
|
| Constructor and Description |
|---|
FileReadWrite() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getFileContents(java.lang.String filename) |
static java.lang.String |
getFileContents(java.lang.String filename,
java.lang.String encoding)
Returns the content of a file into a string
|
public static java.lang.String getFileContents(java.lang.String filename,
java.lang.String encoding)
throws java.io.IOException
filename - The file name to read fromencoding - The file encoding (optional, default "utf-8")java.io.IOException - If reading the file was impossiblepublic static java.lang.String getFileContents(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionCopyright © Sylvain HallĂ©. All Rights Reserved.