1 Reply Latest reply: Dec 31, 2006 2:56 AM by 807599 RSS

    parsing txt file from internet.

      Dear JavaGurues

      I would like to know how I can pharse a simple text file that is uploaded somewhere on the internet(as an txt file, not an html site..)
      I need to do this with JavaME.

      I found the API of the javaME to be a little more confusing then for the full one..(Its not all in one site..?)

      Links to some classes in the api or other hints would be greatly apricieted!

        • 1. Re: parsing txt file from internet.
          You'd probably be better off asking this on a J2ME forum.

          But anyway a J2ME runtime environment is built out of various profiles that are tuned to the specifics of the device or rather the kind of device...a PDA is likely to be more powerful, and have a richer user interface, than a cell phone, for example. So you have to look at the particular device and see what kind of profiles are available on it. I can't recall how much of J2ME is outside those profiles (and thus universal to all J2ME) but as you've already seen, it's not necessarily a lot.

          I once wrote a parser in J2ME plus the profiles for a cell phone. I eventually decided that it was too much trouble; it was easier to write something in Perl on a web server that produced WML output, and then use the web browser on the phone to get the WML. Parsing can use a lot of memory and memory is always tight on a phone. One hint though: a lot of the pain involved converting from (1-byte) ASCII to (2-byte) Java Unicode, and then back again to the byte-sized record-based storage mechanism. If I had decided to continue the project, I would have thrown that out and just not made the program portable to different character sets. It's kind of a cheat but it may have been the only way to make the project feasible at all.