commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjeev Tripathi" <sanjeev.tripa...@parago.com>
Subject RE: [httpclient] Sending serialized object from httpclient to servlet.
Date Tue, 08 Feb 2005 20:22:47 GMT
Thanks Bob, Wendy. 
It worked well. Now I am able to send test object to servlet from http
client.

Now I need to test for My real objects and they are very big.
I need to pass heavy collection of Value Objects to and from to the
servlet from http client. Hope it will work there too.

Thanks.
Sanjeev Tripathi
 



-----Original Message-----
From: Bob Arnott [mailto:boba@aungate.com] 
Sent: Tuesday, February 08, 2005 11:47 AM
To: 'Jakarta Commons Developers List'
Subject: RE: [httpclient] Sending serialized object from httpclient to
servlet.

Sanjeev Tripathi wrote:
> Thanks Wendy.
>   I know how to serialize object to file or socket. But
> How I can convert object to bytes so I can use
> byte[] encodedData = Base64.encodeBase64( binaryData );

Try using the serialize(Serializable obj) method on 
org.apache.commons.lang.SerializationUtils.

byte[] encodedData =
Base64.encodeBase64(SerializationUtils.serialize(obj));

-- 
Bob Arnott



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message