public class FileUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
YAML_EXTENSION |
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
readYamlFile(String location,
Class<T> type)
Returns an instance of the specified type from the given configuration YAML.
|
public static final String YAML_EXTENSION
public static <T> T readYamlFile(String location, Class<T> type) throws IOException
location - location of the configuration YAML fileIOException - thrown when no file is found in the given location or when error on closing file input streamCopyright © 2018 WSO2. All rights reserved.