public class PropertiesReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LOCAL_ROOT_PATH |
static String |
PROPERTIES_TYPE_CONF |
static String |
PROPERTIES_TYPE_PROPERTIES |
static String |
PROPERTIES_TYPE_PROPERTIES_TYPE2 |
| Constructor and Description |
|---|
PropertiesReader() |
| Modifier and Type | Method and Description |
|---|---|
static ArrayList<String> |
getAllFiles(File curDir) |
static ArrayList<String> |
getFileList(File curDir,
ArrayList<String> array)
gets all files in a directory to get all files: File curDir = new File(".");
getAllFiles(curDir);
|
static String |
getLocalResourcePath() |
static List<Properties> |
getPropertiesByFileType(String path) |
static List<Properties> |
getPropertiesByFileType(String path,
String fileType)
gets all properties file by file type in a directory
|
static String |
getPropertyPath(String path)
recognized config file as a property file.
|
static String |
getStringProperty(String key,
Properties Property)
gets the value of the properties file based on key value, And sets default
value if value is missing
|
static boolean |
isUsingCloud() |
static List<Properties> |
Property(String path) |
public static String LOCAL_ROOT_PATH
public static String PROPERTIES_TYPE_PROPERTIES
public static String PROPERTIES_TYPE_PROPERTIES_TYPE2
public static String PROPERTIES_TYPE_CONF
public static List<Properties> Property(String path) throws Exception
path - path to properties fileException - exception from getting properties filepublic static String getPropertyPath(String path)
path - public static List<Properties> getPropertiesByFileType(String path, String fileType) throws Exception
path: - directory pathfileType: - eg. ".conf"Exception - exception from getting properties filepublic static List<Properties> getPropertiesByFileType(String path) throws Exception
Exceptionpublic static String getLocalResourcePath()
public static boolean isUsingCloud()
public static String getStringProperty(String key, Properties Property)
key - key in properties fileProperty - target properties from property fileCopyright © 2021. All rights reserved.