org.csource.common.IniFileReader Java Examples
The following examples show how to use
org.csource.common.IniFileReader.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientGlobal.java From fastdfs-spring-boot-starter with GNU Lesser General Public License v3.0 | 3 votes |
/** * load from properties file * * @param propsFilePath properties file path, eg: * "fastdfs-client.properties" * "config/fastdfs-client.properties" * "/opt/fastdfs-client.properties" * "C:\\Users\\James\\config\\fastdfs-client.properties" * properties文件至少包含一个配置项 fastdfs.tracker_servers 例如: * fastdfs.tracker_servers = 10.0.11.245:22122,10.0.11.246:22122 * server的IP和端口用冒号':'分隔 * server之间用逗号','分隔 */ public static void initByProperties(String propsFilePath) throws IOException, FastdfsException { Properties props = new Properties(); InputStream in = IniFileReader.loadFromOsFileSystemOrClasspathAsStream(propsFilePath); if (in != null) { props.load(in); } initByProperties(props); }
Example #2
Source File: ClientGlobal.java From fastdfs-client-java with BSD 3-Clause "New" or "Revised" License | 3 votes |
/** * load from properties file * * @param propsFilePath properties file path, eg: * "fastdfs-client.properties" * "config/fastdfs-client.properties" * "/opt/fastdfs-client.properties" * "C:\\Users\\James\\config\\fastdfs-client.properties" * properties文件至少包含一个配置项 fastdfs.tracker_servers 例如: * fastdfs.tracker_servers = 10.0.11.245:22122,10.0.11.246:22122 * server的IP和端口用冒号':'分隔 * server之间用逗号','分隔 */ public static void initByProperties(String propsFilePath) throws IOException, MyException { Properties props = new Properties(); InputStream in = IniFileReader.loadFromOsFileSystemOrClasspathAsStream(propsFilePath); if (in != null) { props.load(in); } initByProperties(props); }