类 P
java.lang.Object
org.tio.utils.jfinal.P
P. P can load properties file from CLASSPATH or File object.
-
方法概要
修饰符和类型方法说明static Propstatic Propstatic Propstatic Propstatic Propstatic PropappendIfExists(File file) static PropappendIfExists(File file, String encoding) static PropappendIfExists(String fileName) static PropappendIfExists(String fileName, String encoding) static voidclear()static booleancontainsKey(String key) static Stringstatic Stringstatic BooleangetBoolean(String key) static BooleangetBoolean(String key, Boolean defaultValue) static Integerstatic Integerstatic Longstatic Longstatic PropgetProp()static Propstatic PropUsing the properties file bye File object.static PropUsing the properties file bye File object.static PropUsing the properties file.static PropUsing the properties file.static Prop
-
方法详细资料
-
use
Using the properties file. It will loading the properties file if not loading.- 另请参阅:
-
use
Using the properties file. It will loading the properties file if not loading.Example:
P.use("config.txt", "UTF-8");
P.use("other_config.txt", "UTF-8");
String userName = P.get("userName");
String password = P.get("password");
userName = P.use("other_config.txt").get("userName");
password = P.use("other_config.txt").get("password");
P.use("com/jfinal/config_in_sub_directory_of_classpath.txt");- 参数:
fileName- the properties file's name in classpath or the sub directory of classpathencoding- the encoding
-
use
Using the properties file bye File object. It will loading the properties file if not loading.- 另请参阅:
-
use
Using the properties file bye File object. It will loading the properties file if not loading.Example:
P.use(new File("/var/config/my_config.txt"), "UTF-8");
Strig userName = P.use("my_config.txt").get("userName");- 参数:
file- the properties File objectencoding- the encoding
-
useless
-
clear
public static void clear() -
append
-
append
-
append
-
appendIfExists
-
appendIfExists
-
append
-
append
-
appendIfExists
-
appendIfExists
-
getProp
-
getProp
-
get
-
get
-
getInt
-
getInt
-
getLong
-
getLong
-
getBoolean
-
getBoolean
-
containsKey
-