midlets archive - a way to store strings portable

Discussion in 'Java' started by Gyro, Feb 26, 2005.

  1. Gyro

    Gyro Guest

    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?
    Gyro, Feb 26, 2005
    #1
    1. Advertising

  2. 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 <>
    Visit my homepage: http://mcpierce.multiply.com
    "By doubting we come to inquiry, through inquiry truth." - Peter Abelard
    Darryl Pierce, Feb 26, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eli Bendersky
    Replies:
    1
    Views:
    1,151
    Mike Treseler
    Mar 1, 2006
  2. elziko

    MIDlets

    elziko, Jul 18, 2003, in forum: Java
    Replies:
    2
    Views:
    542
    Wong Chee Wee
    Jul 18, 2003
  3. leni
    Replies:
    3
    Views:
    909
    Dag Sunde
    Aug 7, 2005
  4. Replies:
    7
    Views:
    900
  5. Diego Martins
    Replies:
    0
    Views:
    338
    Diego Martins
    Aug 22, 2006
Loading...

Share This Page