Link to home
Start Free TrialLog in
Avatar of talltk
talltk

asked on

Implementing RMI and Object Serialization Without Java Facilities

Dear experts

I have been given a school project to implement marshaling/unmarshaling without using any RMI,CORBA and Java Object Serializations without any Java facilities.

Meaning I'm not allowed to import any RMI or Serialization packages/libraries.

I totally don't have an idea of how to start! Could any experts please advice

Thanks
Mark
ASKER CERTIFIED SOLUTION
Avatar of MicheleMarcon
MicheleMarcon
Flag of Italy image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ
Sounds more like a second degree project ;-)

Start by studying the Java class file spec and classloading in detail
Avatar of PascalHeraud
PascalHeraud

You can go through class definition using java reflection :
http://java.sun.com/docs/books/tutorial/reflect/

Iterating over attributes, you will have to write them a Stream using encoding like Michele suggested.
You can also use the data output stream that is able to marshall /unmarshall objects into a stream ( java.io not a Serialization stuff ;) )
http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataOutputStream.html