config.java
来自「利用华为 信息机发送短信 的java 源码」· Java 代码 · 共 29 行
JAVA
29 行
package com.quark.util;
import java.util.Properties;
import java.io.FileInputStream;
public class Config
{
private String file="Config";
public Config()
{
}
public Config(String file)
{
this.file=file;
}
public String getValue(String name,String defaultVal)
{
Properties pros=new Properties();
try{
FileInputStream inputFile=new FileInputStream(this.file);
pros.load(inputFile);
}
catch(Exception e){
System.out.println(this.file+" not find!");
e.printStackTrace();
}
return pros.getProperty(name, defaultVal);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?