日期:2014-05-20 浏览次数:20704 次
private void writeFile(String filePath, String content)
{
try
{
File tfile = new File(filePath);
RandomAccessFile rdtfile = new RandomAccessFile(tfile, "rw");
rdtfile.write(content.getBytes("utf-8"));
//rdtfile.writeUTF(content);
rdtfile.close();
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
}