Re: J2ME : fastest way to read lines from text resource into a string array ?
From: Roedy Green (see_at_mindprod.com.invalid)
Date: 04/26/04
- Next message: homecurr_at_yahoo.com: "what tech Yahoo uses?"
- Previous message: Roedy Green: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- In reply to: Darryl L. Pierce: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- Next in thread: Darryl L. Pierce: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- Reply: Darryl L. Pierce: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Apr 2004 03:24:47 GMT
On Mon, 26 Apr 2004 02:40:59 GMT, "Darryl L. Pierce"
<mcpierce@myrealbox.com> wrote or quoted :
>Since he's creating the data before putting it into his JAR, he can easily
>create the file with Java. I used the same solution in my last project to
>put default i18n data into the MIDlet suite, and we supported several
>non-Latin character sets in this manner.
For that sort of thing, I just use ObjectStreams (which internally
uses writeUTF). There is then just a single line of code in the
Applet to restore the entire universe of data. It always works
perfectly no matter how complicated the data.
That's how the CurrCon currency converter app on my website works. See
http://mindprod.com/products.html#CURRCON and also the navigator if
you turn on frames that lets you jump anywhere in the glossary
directly. I also use that in the Replicator. see
http://mindprod.com/products.html#REPLICATOR. The manifest.ser file
is a serialised copy of everything your client needs to know.
This keeps the Applet or JWS client small since you have no baggage in
there to deal with parsing or even individual fields.
For sample code on how to do that see http://mindprod.com/fileio.html
Serialisation was pretty rocky at first. Now we know where the rocks
are and it has been fixed up. Look into it. It saves a TON of boring
hard to maintain code.
-- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
- Next message: homecurr_at_yahoo.com: "what tech Yahoo uses?"
- Previous message: Roedy Green: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- In reply to: Darryl L. Pierce: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- Next in thread: Darryl L. Pierce: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- Reply: Darryl L. Pierce: "Re: J2ME : fastest way to read lines from text resource into a string array ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|