public static boolean updateFile(String str)
{
str = test;
boolean blg = false;
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(C:\\datatxt));
StringBuilder sb = new StringBuilder();
sbappend(str);
String a = sbtoString();
byte[] b = (a)getBytes();
// 写入文件还可以用其他方法如write(String str)
bwwrite(a blength);
bwclose();
} catch (IOException e) {
// TODO Autogenerated catch block
eprintStackTrace();
}
return blg ;
}