View Single Post
Old 03-17-2012, 06:31 PM   #3
hjalfi
Junior Member
hjalfi began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2011
Device: Kindle 3g
That's because the ghastly old dialect of Java that the Kindle supports does support creating PrintStreams directly from Files. You have to create a FileOutputStream first. Try this:

var home = kjs.getHomeDirectory();
var f = new java.io.File(home, "test.txt");
var fos = new java.io.FileOutputStream(f);
var ps = new java.io.PrintStream(fos);

The Kindle only supports PBP 1.1, which is now pathetically old; see the documentation here for the API list:

http://docs.oracle.com/javame/config...217/index.html
hjalfi is offline   Reply With Quote