midlets archive - a way to store strings portable

G

Gyro

Hi. please suggest method/technique to store strings in a midlet jar
archive portable.
I wanna a ui strings to be stored in a file for better/easy
internationalisation. Is a plain text files with extensions
corresponding to current phone locale is a good way? What you think?
 
D

Darryl Pierce

Gyro said:
Hi. please suggest method/technique to store strings in a midlet jar
archive portable.
I wanna a ui strings to be stored in a file for better/easy
internationalisation. Is a plain text files with extensions
corresponding to current phone locale is a good way? What you think?

You can do it that way, using a text file in the JAR and then accessing
it via Class.getResourceAsStream(String). Another way (and one I prefer)
is to create a binary file at build-time using DataOutputStream. Then
you can access the data at runtime using a DataInputStream and save
yourself all of the parsing time needed to read in a straight text file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top