Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > midlets archive - a way to store strings portable

Reply
Thread Tools

midlets archive - a way to store strings portable

 
 
Gyro
Guest
Posts: n/a
 
      02-26-2005
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?
 
Reply With Quote
 
 
 
 
Darryl Pierce
Guest
Posts: n/a
 
      02-26-2005
Gyro wrote:
> 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.

--
Darryl L. Pierce <(E-Mail Removed)>
Visit my homepage: http://mcpierce.multiply.com
"By doubting we come to inquiry, through inquiry truth." - Peter Abelard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Portable way to compare strings using case-insensitive Diego Martins C++ 0 08-22-2006 06:14 PM
Strings, Strings and Damned Strings Ben C Programming 14 06-24-2006 05:09 AM
splitting strings in midlets leni Java 3 08-07-2005 04:27 PM
Can MIDlets beam? Josef Garvi Java 8 08-07-2003 10:32 AM
MIDlets elziko Java 2 07-18-2003 01:36 PM



Advertisments