import java.io.*; String filePath = "/data/account.txt"; String conent = vars.get("account"); BufferedWriter out = null; try { File file = new File(filePath); File fileParent = file.getParentFile(); if (!fileParent.exists()) { fileParent.mkdirs(); } file.createNewFile(); out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file, true))); out.write(conent + "\r\n"); } catch (Exception e) { e.printStackTrace(); } finally { try { out.close(); } catch (IOException e) { e.printStackTrace(); } }
jmeter的bean shell 如何写数据到文件中
猜你喜欢
转载自www.cnblogs.com/yecao8888/p/11351767.html
今日推荐
周排行