将客户端传来的东西写入file

public static void recordTimeLog(String time) throws IOException{
File newFile = new File(Blob.getStore(),"Log.txt");  
if( !newFile.exists()){
newFile.createNewFile();  
}
 
FileWriter fileWriter = new FileWriter(Blob.getStore()+"/Log.txt",true);
fileWriter.write("\r\n"+time);
fileWriter.close();
status_code = Const.SUCCESS;
dataMap.put("status_code", status_code);
dataMap.put("msg", msg);
renderJSON(dataMap);
}

你可能感兴趣的:(将客户端传来的东西写入file)