Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 45725 invoked from network); 8 Feb 2005 17:49:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Feb 2005 17:49:18 -0000 Received: (qmail 84654 invoked by uid 500); 8 Feb 2005 17:49:16 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 84563 invoked by uid 500); 8 Feb 2005 17:49:15 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 84546 invoked by uid 99); 8 Feb 2005 17:49:15 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from cmbg.autonomy.com (HELO email.dremedia.com) (194.154.169.4) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 08 Feb 2005 09:49:15 -0800 Received: from boba [10.1.2.135] by email.dremedia.com with ESMTP (SMTPD32-8.12) id AA51208D00B4; Tue, 08 Feb 2005 17:43:45 +0000 From: "Bob Arnott" To: "'Jakarta Commons Developers List'" Subject: RE: [httpclient] Sending serialized object from httpclient to servlet. Date: Tue, 8 Feb 2005 17:47:08 -0000 Message-ID: <00f101c50e06$35dc2660$8702010a@autonomy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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