File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java Micro Edition
How to write data to file Java ME cldc 1.1 midp 2.0
Joined: Nov 10, 2011
Nov 10, 2011 01:05:26
I newly in
me, please help me.
I make project in NetBeans 7.0.1. and use cldc 1.1 midp 2.0.
I want to write data to the file.
How can I do it?
I try to use
. But it don't exists in java.io
NetBeans shows me only this list of classes and interfaces in java.io:
, Reader, Writer.
Why it so short?
And how I can write data to file?
Data can be array of bytes (byte) or Object it better.
Joined: Sep 03, 2011
Jan 18, 2012 01:11:26
J2ME is very compact. it doesn't have any of
To access files, use GCF (Generic Connection Framework)
FileConnection fc = (FileConnection)Connector.open("file:///c:/data/myfile.txt",Connector.WRITE); OutputStream o = fc.openOutputStream(); ..... your logic .......... fc.close();
NOTE: this will work only if your device supports FileConnections API (which is optional API)
There is still lot to learn!
I agree. Here's the link:
subject: How to write data to file Java ME cldc 1.1 midp 2.0
CLDC or MIDP?
Strange objective: 1.2 MIME
Not support the float-point methods in io package of MIDP 2.0
BlackBerry main(1#) development language is Java
Objectives for the SCMAD exam are here!!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014