hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: Downloading
Date Mon, 21 Jul 2003 15:38:35 GMT
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 <ortwin.glueck@nose.ch> 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] ortwin.glueck@nose.ch
  hardturmstrasse 171               [pgp key]          0x81CF3416
  8005 zurich                       [office]      +41-1-277 57 35
  switzerland                       [fax]         +41-1-277 57 12


Mime
View raw message