?? fileprops.java
字號:
package com.hansky.tools.codewizard;
import java.io.*;
import java.util.*;
/**
* @author Kaiyang Liu
* @version 1.0, 07/21/2000
*/
public class FileProps {
File file;
Properties props;
public FileProps() {
props = new Properties();
}
public FileProps(File file) {
this.file = file;
props = new Properties();
load();
}
public void load() {
try {
FileInputStream fis = new FileInputStream(file);
try {
props.load(fis);
} finally {
fis.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public void save() {
try {
FileOutputStream fos = new FileOutputStream(file);
try {
props.store(fos, null);
} finally {
fos.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public String getProperty(String key) {
return props.getProperty(key);
}
public void setProperty(String key, String value) {
props.setProperty(key, value);
}
public Enumeration keys() {
return props.keys();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -