var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: j2me append=true error, J2ME need help
I wanna output multiple answer to the text file i create in the root location.
but if i put
String uri = "file:///root1/myfile2.txt;append=true";
OutputConnection connection = (OutputConnection)
Connector.open(uri, Connector.WRITE );
OutputStream out = connection.openOutputStream();
printStream output = new PrintStream( out );
output.print( "Answer 1 is:\n\n" + list.getString(x)); out.close();
the append=true will cause error:java.io.IOException:
if i remove the append=true , i can save the data....but only one data is save to the text file each time.
One of my initial thoughts is...
Why are you writing to a text file?
The whole string is considered to be a filename, and as such it is not a valid filename.
Check the documentation, at some point you can tell the method you use to append. I usually use a filewriter and you can set an append flag when creating the file object. Don't know with connector and outputstream but should be simular.
Method: FileWriter(String fileName, boolean append)
if the link doesn't work then google "filewriter java"