当前位置:网站首页>【beanshell】数据写入本地多种方法
【beanshell】数据写入本地多种方法
2022-07-05 16:27:00 【bulabula2022】
方法1:
FileWriter fstream = new FileWriter("E:\\JENKINS自动化\\msg.txt",true);
BufferedWriter out = new BufferedWriter(fstream);
out.write("结果为:"+vars.get("biz_order_no_1")+" 可连接多个变量结果"+"\n");
out.close();
fstream.close();
方法2:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
String orderToken= vars.get("orderToken");
FileWriter fw=new FileWriter("C:\\Users\\Damai\\Desktop\\sd_script\\or.txt",true);
BufferedWriter out=new BufferedWriter(fw);
out.write(orderToken.replace("\"","")+",\r\n");
out.close();
边栏推荐
- [js] skill simplification if empty judgment
- Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
- Sentinel flow guard
- Basic introduction to the control of the row component displaying its children in the horizontal array (tutorial includes source code)
- Browser rendering principle and rearrangement and redrawing
- File operation --i/o
- Etcd build a highly available etcd cluster
- How does win11 change icons for applications? Win11 method of changing icons for applications
- 外盘期货平台如何辨别正规安全?
- How was the middle table destroyed?
猜你喜欢
美国芯片傲不起来了,中国芯片成功在新兴领域夺得第一名
Application of threshold homomorphic encryption in privacy Computing: Interpretation
[61dctf]fm
How to install MySQL
养不起真猫,就用代码吸猫 -Unity 粒子实现画猫咪
拷贝方式之DMA
[team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details
Jarvis OJ Flag
[729. My Schedule i]
[Jianzhi offer] 63 Maximum profit of stock
随机推荐
[first lecture on robot coordinate system]
养不起真猫,就用代码吸猫 -Unity 粒子实现画猫咪
C# TCP如何限制单个客户端的访问流量
Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
文件操作--I/O
[deep learning] how does deep learning affect operations research?
ECU简介
The difference between searching forward index and inverted index
为季前卡牌游戏 MotoGP Ignition Champions 做好准备!
[61dctf]fm
面对新的挑战,成为更好的自己--进击的技术er
中国广电正式推出5G服务,中国移动赶紧推出免费服务挽留用户
浏览器渲染原理以及重排与重绘
How does win11 change icons for applications? Win11 method of changing icons for applications
Hiengine: comparable to the local cloud native memory database engine
【刷題篇】鹅廠文化衫問題
齐宣王典故
Jarvis OJ webshell analysis
什么是ROM
深潜Kotlin协程(二十一):Flow 生命周期函数