HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
1. Feel Free to ask and submit anything on and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.

java-basics: What is difference between Marshaling and Serialization in java?

i want to know about serialization and marshaling
i little bit confuse @ this
pls give some examples

java x 210
basics x 171
Posted On : 2016-08-10 09:20:10.0
profile rahul patil - rahul patil


Marshaling is about getting parameters from here to there, while serialization is about copying structured data to or from a primitive form such as a byte stream. In this sense, serialization is one means to perform marshaling, usually implementing pass-by-value semantics.

It is also possible for an object to be marshaled by reference, in which case the data "on the wire" is simply location information for the original object. However, such an object may still be amenable to value serialization.

As @Bill mentions, there may be additional metadata such as code base location or even object implementation code.

Serialization- When you serialize an object, only the member data within that object is written to the byte stream; not the code that actually implements the object.

Marshaling- Term Marshaling is used when we talk about passing Object to remote objects(RMI). In Marshaling Object is serialized(member data is serialzied) + Codebase is attached.

Posted On : 2016-08-10 22:34:06
Satisfied : 1 Yes  0 No
profile Rishi Kumar - Rishi Kumar
Reply This Thread

Post Answer
Please Login First to Post Answer: Login login with facebook -