Quent,

I still believe that the problem is the *upload* and not the download. But if you still want to parse the Multipart-MIME stream then please refer to the specs and FileUpload documentation. The boundary string should be passed in a header like

Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_000D_01C34AF0.7BE33480"


Odi


Querent wrote:
Hi odi,
The MultipartStream of FileUpload seems looks good for downloading.
But can you let me know how to get the boundary for the constructor:
MultipartStream(java.io.InputStream input, byte[] boundary) I think I can get the content file using readBodyData(java.io.OutputStream output)
But still can't get the correct boundary.
Thanks a lot..
quent



Ortwin_Gl�ck <[EMAIL PROTECTED]> wrote: Quent,

I guess you are trying to make a file upload with Multipart MIME encoded attachments. HttpClient can not parse such responses, but it can send such requests. Consider using the Commons FileUpload component for your problem. AFAIK the FileUpload guys have a release pending and the current code is stable.

Odi

Querent wrote:

Hi..
I am new to httpclient.
I am developing a program that download a file.
I've got the response using : InputStream bodyStream = postMethod.getResponseBodyAsStream();


When I write the bodyStream to a file, it write the whole response things.
(I only want to save the file).

Is there anyway I could get only the content of the file ?

I attached my downloaded file.


Unfortunately attachments > 100 KB get stripped by the list.


many thanks in advance.

Cheers,

quent

-- _________________________________________________________________ NOSE applied intelligence ag [www] http://www.nose.ch ortwin gl�ck [email] [EMAIL PROTECTED] hardturmstrasse 171 [pgp key] 0x81CF3416 8005 zurich [office] +41-1-277 57 35 switzerland [fax] +41-1-277 57 12


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to