org.csource.common
类 IniFileReader

java.lang.Object
  继承者 org.csource.common.IniFileReader

public class IniFileReader
extends Object

ini file reader / parser

版本:
Version 1.0
作者:
Happy Fish / YuQing

构造方法摘要
IniFileReader(String conf_filename)
           
 
方法摘要
static ClassLoader classLoader()
           
 boolean getBoolValue(String name, boolean default_value)
          get boolean value from config file
 String getConfFilename()
          get the config filename
 int getIntValue(String name, int default_value)
          get int value from config file
 String getStrValue(String name)
          get string value from config file
 String[] getValues(String name)
          get all values from config file
static InputStream loadFromOsFileSystemOrClasspathAsStream(String filePath)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

IniFileReader

public IniFileReader(String conf_filename)
              throws IOException
参数:
conf_filename - config filename
抛出:
IOException
方法详细信息

classLoader

public static ClassLoader classLoader()

loadFromOsFileSystemOrClasspathAsStream

public static InputStream loadFromOsFileSystemOrClasspathAsStream(String filePath)

getConfFilename

public String getConfFilename()
get the config filename

返回:
config filename

getStrValue

public String getStrValue(String name)
get string value from config file

参数:
name - item name in config file
返回:
string value

getIntValue

public int getIntValue(String name,
                       int default_value)
get int value from config file

参数:
name - item name in config file
default_value - the default value
返回:
int value

getBoolValue

public boolean getBoolValue(String name,
                            boolean default_value)
get boolean value from config file

参数:
name - item name in config file
default_value - the default value
返回:
boolean value

getValues

public String[] getValues(String name)
get all values from config file

参数:
name - item name in config file
返回:
string values (array)


Copyright © 2017. All rights reserved.