Serialization means breaking up an object into a Series (usually of bytes). Note that you usually leave any static members and anything marked "transient" behind. You can save the bytes in a file, or send them across a network. Don't know whether that means sending an object across the internet, but I don't see why not. Go here, download and unzip a copy of Thinking In Java (Bruce Eckel, 3rd edition) and look at the second part of the chapter about interfaces and inner classes (I think ch 8). (There is a 4th edition, but you have to pay for that! I've got it and just looking at the chapter for about 30 seconds, I don't think that much has changed.)
Originally posted by vijay shanker: What does serialization mean?
Serialization is a process in which you can "serialize" or "persist" the state of an object in a permanent storage.
What are these terms mean?
persist means saving. permanent means into a file in a disk for example. state of an object means the data values an instance holds to get its uniqueness.
Why do you need such an action?
When you say "a state of an object", the scope of the state is existing only temporarily. that means till the time your program is in memory (memory which helps you create an object]. What if you need to hold the data values held by an object even after the program terminates?
You need to shift the data values from this memory (RAM) to another place, that could range anything which helps to get the values without the actual program which was responsible of dealing with this particular instance.
That target location should offer you the "permanent" storage. That's why this persistence came in picture and you have "serialization" to achieve this.
To read more about Serialization, you may please read the Sun's tutorials here.
I don't think you need any of those Stream objects. Just make an object in the client side as "serializable" (means, make the class implements the Serializable interface) and send that object of the class as an argument to the method in the Server.
You need to make a RMI call here.
Joined: Oct 26, 2007
If that is the case i got to ask you how to do that call over Http is it possible to make RMI call over Http?
What sort of a UI do you have? Is it a jsp rendered HTML? If yes, then you are just wasting your time thinking about serialization. There is no way you can use Serialization untill and unless you are really prepared to write some jazzy looking code. [ January 02, 2008: Message edited by: Nitesh Kant ]