Hi,
I need your advise on serialization.
I need to send stream to my server which one is efficient
Method 1:
1. read the object
2. convert the object using xstream in to xml
string
3. convert to bytes and write to
servlet output stream
4. read the bytes and convert bytes to xml string
5. convert xml string back to object
Method 2:-
1. read the object
2. convert to bytes using object output stream and write to servlet output stream
4. read the bytes and convert back to object using object input stream
my question is which is efficient ?
using method 1 and method 2 ?
by looking at the steps , one could argue that method 1 having xml over head
am I right? or using object output stream is more over head ( method 2 ) ?
my result set could be (comes back from servlet) could be several thousands be records
Any help is greatly appreciated