public class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
file2List(String fileName)
load resource or classpath file name and convert into list
|
static List<String> |
file2List(String fileName,
ClassLoader loader)
load the specified class loader
|
static List<String> |
file2List(String fileName,
InputStream stream)
load the specified class loader
|
static String |
readYaml(String fileName,
String key)
read yaml file and return the value
|
public static List<String> file2List(String fileName) throws Exception
fileName - resources of file nameExceptionpublic static List<String> file2List(String fileName, ClassLoader loader) throws Exception
fileName - loader - Exceptionpublic static List<String> file2List(String fileName, InputStream stream) throws Exception
fileName - stream - ExceptionCopyright © 2016. All rights reserved.