1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
660 views
by ron-s-6919 (4.5k points)
I would like to output content to a file.  Can I use Java functions to write the contents of my message to a file on the file system?

1 Answer

0 votes
 
Best answer
You can use the Java IO library to write the contents of any variable out to a file as follows:
 
// write bytes out to a file
var out = new java.io.FileOutputStream('C:\\QIE\\tmp.txt', false);
var bytes = message.getBytes();
out.write(bytes);
out.close();
by ron-s-6919 (4.5k points)
edited by ben-s-7515
...