件_文_Properties
Properties properties = new Properties();properties.setProperty("key1", "value1");
properties.setProperty("key2", "value2");
File file = new File("C:\\a\\b");
if(!file.exists()){
file.mkdirs();
}
File files = new File(file.getPath() + "\\a.b");
FileOutputStream fops = new FileOutputStream(file);
properties.store(fops, "description");
-----------------------------------------
Properties properties = new Properties();
FileInputStream inputStream = new FileInputStream(file.getLocation().toFile());
properties.load(inputStream);
properties.delete("key1");
properties.getProperty(key);
页:
[1]