×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    14

    Serializing objects in J2ME

    I have a desktop application which saves an object (where the class implements Serializable interface in J2SE) to a file.

    I wish to do the same for my mobile application but I have not been able to find an equivalent interface for J2ME.

    I need a way such that the object that has been saved by either the desktop application (J2SE) or the mobile application (J2ME) can be recovered by each other.

    Short of implementing my own interface, is there a solution to my problem?

    Thanks in advance.

  2. #2
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    307

    Re: Serializing objects in J2ME

    Unfortunatelly the J2ME is not supporting object serializing directly, as the J2SE.

    However, you always can store object-related data either in RMS or in files, and recreate the state of the object after.

    Here is a nice example of storing game scores in RMS (and extracting them back): http://java.sun.com/javame/reference...e-summary.html

  3. #3
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: Serializing objects in J2ME

    Hi,
    J2me doesnt support serialization as my friend told,but it is possible to implement custom serialization.
    Thanks
    soku

  4. #4
    Registered User
    Join Date
    Nov 2007
    Posts
    2

    Re: Serializing objects in J2ME

    The data mapping implemented in the following URL may help.
    http://developers.sun.com/mobility/m...s/databasemap/

    PS:Take a note of "fromByteArray" and "toByteArray" methods in the URL.

  5. #5
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: Serializing objects in J2ME

    You can refer to http://floggy.sourceforge.net/index.html
    In this project they are saving and restoring Objects in J2me it might help you.

    thanks,
    Ekta

Similar Threads

  1. How can the WAP browser communicate to J2ME application?
    By hbfornies in forum Mobile Java General
    Replies: 20
    Last Post: 2007-03-02, 16:32
  2. Serializing objects in m3g
    By bgrafael in forum Mobile Java General
    Replies: 0
    Last Post: 2005-03-08, 21:09
  3. J2ME Polish Version 1.0 RC6
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-20, 11:25
  4. J2ME Polish 1.0 RC1!
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-06-15, 02:53
  5. TinyLine SVG Minute Toolkit for J2ME: version 1.4 released
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-05, 16:25

Posting Permissions

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