hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: Downloading Images
Date Thu, 11 Mar 2004 12:32:11 GMT
Except for error handling and stuff, this is the right approach.
To store the image, you have to create a FileOutputStream
and copy the response data there. See also the section
"Read the Response" in the tutorial:
http://jakarta.apache.org/commons/httpclient/tutorial.html

cheers,
  Roland






"Saifadam Pathan" <spathan@controlnet.co.in>
11.03.2004 10:54
Please respond to "Commons HttpClient Project"
 
        To:     "Commons HttpClient Project" 
<commons-httpclient-dev@jakarta.apache.org>
        cc: 
        Subject:        Downloading Images


Hi ...

How do i do the following...

I have specified the url as  a link to an image, ( example : url =3D =
"http://www.google.co.in/images/hp0.gif" ). And then I am calling the =
following...

HttpMethod method =3D new GetMethod(url);
statusCode =3D client.executeMethod(method);
.....

.....

**************************************


Is this the right way. How do i store this image?

Thanks in advance.=20

Saif---------------------------------------------------------------------
To unsubscribe, e-mail: 
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: 
commons-httpclient-dev-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message