On Fri, 2008-05-16 at 16:05 -0400, [EMAIL PROTECTED] wrote:
> Hi All,
>
> I've requirement to send both serialized java object and stream object.
> Here is the code that sends serialized object
>
> ByteArrayOutputStream requestStream = new
> ByteArrayOutputStream();
> ObjectOutputStream objectOutput = new
> ObjectOutputStream(requestStream);
> objectOutput.writeObject(request);
> objectOutput.close();
>
> InputStream requestContent = new
> ByteArrayInputStream(requestStream.toByteArray());
> if (requestContent != null) {
> post.setRequestEntity(new
> InputStreamRequestEntity(requestContent));
> }
>
> We need to optionally send stream object as well. I believe we need to
> use multipart request entity. The HC currently supports FilePart and
> StringPart. Do we need to write another type of Part like StreamPart to
> do so?
>
Yes, you do
Oleg
> Help is appreciated.
>
> Thanks in advance
>
> Valli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]