Results 1 to 2 of 2
  1. #1
    urbanleg is offline Member
    Join Date
    Jul 2011
    Posts
    25
    Rep Power
    0

    Default Serialization of Derived classes

    Hello,
    I am trying to send via server - serialized classes

    problem is i got one base class and 10 derived classes from it.

    now, when i do deserialization of "Derived class 2" how do i know what to cast it back in the client ?
    it can by any of the 10 Derived or even the Base itself.

    thanks

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,403
    Rep Power
    25

    Default

    how do i know what to cast it back in the client
    You could send a list of the class types in the same order as the classes to be read and cast.

Similar Threads

  1. Serialization
    By garrym in forum New To Java
    Replies: 12
    Last Post: 05-18-2011, 01:49 PM
  2. serialization
    By elsa14290 in forum Advanced Java
    Replies: 1
    Last Post: 02-06-2010, 04:03 PM
  3. Serialization
    By thayalan in forum Advanced Java
    Replies: 4
    Last Post: 08-03-2009, 10:22 PM
  4. about serialization
    By bishnu in forum New To Java
    Replies: 0
    Last Post: 12-19-2008, 09:13 AM
  5. Replies: 0
    Last Post: 04-04-2008, 02:47 PM

Posting Permissions

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