Class Utils
- java.lang.Object
-
- org.wso2.carbon.logging.service.util.Utils
-
public class Utils extends Object
Utility class with methods used by logging service.
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayList<String>getKeysOfAppender(File srcFile, String appenderName)Util method to return the list of keys for a given appender.static Map<String,String>getKeyValuesOfAppender(File srcFile, String appenderName)static StringgetProperty(File srcFile, String key)Util method to return the specified property from a properties file.
-
-
-
Method Detail
-
getProperty
public static String getProperty(File srcFile, String key) throws IOException
Util method to return the specified property from a properties file.- Parameters:
srcFile- - The source file which needs to be looked up.key- - Key of the property.- Returns:
- - Value of the property.
- Throws:
IOException
-
getKeysOfAppender
public static ArrayList<String> getKeysOfAppender(File srcFile, String appenderName) throws IOException
Util method to return the list of keys for a given appender.- Parameters:
srcFile- - The source file which needs to be looked up.appenderName- - Name of the appender.- Returns:
- - List of keys for the given appender.
- Throws:
IOException- - Error occurred while reading the input stream.
-
getKeyValuesOfAppender
public static Map<String,String> getKeyValuesOfAppender(File srcFile, String appenderName) throws IOException
- Throws:
IOException
-
-