commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Arnott" <b...@aungate.com>
Subject RE: [httpclient] Sending serialized object from httpclient to servlet.
Date Tue, 08 Feb 2005 17:47:08 GMT
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


Mime
View raw message