节点读写
/**
* 获取节点
*/
public static String getPointInfo(String path) {
String prop =null;// 默认值
String result ="";
try {
BufferedReader reader =new BufferedReader(new FileReader(path));
while ((prop = reader.readLine()) !=null) {
result = prop;
}
}catch (IOException e) {
e.printStackTrace();
}
return result;
}
/**
* 写节点
*
* @param point
* @param value
*/
public static void setPoint(String point, int value) {
try {
FileWriter fw =new FileWriter(point);
fw.write('0' + value);
fw.flush();
fw.close();
}catch (Exception e) {
e.printStackTrace();
}
}
本文标题:节点读写
本文链接:https://www.haomeiwen.com/subject/qqlpdftx.html
网友评论