C:\>type file.js
importPackage(java.io);
var file = new PrintWriter(
new BufferedWriter(
new FileWriter("sample.txt")), "UTF-8");
file.println("For example Multibyte String");
file.close();
C:\>rhino
Rhino 1.7 release 2 2009 03 22
js> load("file.js");
Then the "java.io.BufferedWriter@16f8cd0" file that
"For example Multibyte String" was described is output,
and sample.txt of 0kb is output
--------------------------------------
Get Disney character's mail address on Yahoo! Mail
http://pr.mail.yahoo.co.jp/disney/
importPackage(java.io);
var file = new PrintWriter(
new BufferedWriter(
new OutputStreamWriter(
new FileOutputStream("sample.txt"), "UTF-8")));
file.println("For example Multibyte String");
file.close();
> Hello
>
> C:\>type file.js
> importPackage(java.io);
>
> var file = new PrintWriter(
> new BufferedWriter(
> new FileWriter("sample.txt")), "UTF-8");
>
> file.println("For example Multibyte String");
> file.close();
>
> C:\>rhino
> Rhino 1.7 release 2 2009 03 22
> js> load("file.js");
>
> Then the "java.io.BufferedWriter@16f8cd0" file that
> "For example Multibyte String" was described is output,
> and sample.txt of 0kb is output
> --------------------------------------
> Get Disney character's mail address on Yahoo! Mail
> http://pr.mail.yahoo.co.jp/disney/
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> dev-tech-js-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino