×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    1

    Data Structures - storing information

    Hi guys,

    I want to do an application in j2me that basically, gives me information about the trains schedule.

    The information i want to store is like this:
    http://www.cp.pt/StaticFiles/Imagens...eiro_linha.pdf
    (if you don't understand some words, that's because it is in Portuguese; it's only to see the amount of information).
    My idea is to store that information in a .txt file and then load it and store to an appropriated data structure.

    I have a fair knowledge of programming languages especially in JAVA but i am starting at j2me.

    So i want to ask you what Data Structure should i use to store the information and how; i don't know if that is a large amount of information to store, and if it is very "heavy" in terms of memory. By the way my mobile is an N95-1.

    Thanks.

    P.S: Sorry for my bad English.

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Data Structures - storing information

    The data is for a metro/bus/tram service of some kind?

    I suggest you create some kind of binary file. Write a J2SE program, which might read the data from a text file, that uses a DataOutputStream to store the data in a binary file. This will enable you to read the data in J2ME using a DataInputStream - much easier than trying to parse a text file.

    Then, you need to create objects. What these objects are will depend on how you want to use the information. Possibly (if you want to go the whole way), create an object for each station, one for each service ("number"), and one for each stop (a service stopping at a station at a specific time).

    I don't think you'll run out of memory... this isn't all that much information. You can read this document if you're interested in working out how much memory you'll need.

    Graham.

Similar Threads

  1. Storing Data and Securing it.
    By sprateek in forum Mobile Java General
    Replies: 4
    Last Post: 2009-07-16, 07:17
  2. Storing persistant data RMS in j2me
    By jackofall in forum Mobile Java General
    Replies: 22
    Last Post: 2009-04-16, 10:46
  3. Storing data in array
    By Shweta.Hegde in forum Symbian
    Replies: 5
    Last Post: 2009-03-10, 07:29
  4. J2ME encrypt C# decrypt
    By josual in forum Mobile Java Networking & Messaging & Security
    Replies: 13
    Last Post: 2008-10-20, 04:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×