public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getIntFromFile(String filename)
Read a file and return the int value contained therein.
|
static long |
getLongFromFile(String filename)
Read a file and return the long value contained therein.
|
static String[] |
getSplitFromFile(String filename)
Read a file and return an array of whitespace-delimited string values
contained therein.
|
static String |
getStringFromFile(String filename)
Read a file and return the String value contained therein.
|
static List<String> |
readFile(String filename)
Read an entire file at one time.
|
static List<String> |
readFile(String filename,
boolean reportError)
Read an entire file at one time.
|
public static List<String> readFile(String filename)
filename - The file to readpublic static List<String> readFile(String filename, boolean reportError)
filename - The file to readreportError - Whether to log errors reading the filepublic static long getLongFromFile(String filename)
filename - The file to readpublic static int getIntFromFile(String filename)
filename - The file to readpublic static String getStringFromFile(String filename)
filename - The file to readCopyright © 2010–2016 com.github.dblock. All rights reserved.