Skip to main content

How to write data to file Java ME cldc 1.1 midp 2.0

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2010-03-14

I newly in java 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 FileOutputStream. But it don't exists in

NetBeans shows me only this list of classes and interfaces in
ByteArrayInputStream, ByteArrayOutputStream, DataInput, DataInputStream, DataOutput, DataOutputStream, InputStream, InputStreamReader, OutputStream, OutputStreamWriter, PrintStream, 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.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-09-26

I guess you need to learn more about J2ME before starting development. Find a book about J2ME or some online tutorials and follow it first. Maybe this can help:

But briefly about your question: java 2 micro edition as its name says is much smaller than j2se in many aspects. Many of statndard edition's classes don't exist in micro edition or have more restricted funcrionality.

For writing to a file I found this:

It was just a simple search!