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" <[EMAIL PROTECTED]>
11.03.2004 10:54
Please respond to "Commons HttpClient Project"
 
        To:     "Commons HttpClient Project" 
<[EMAIL PROTECTED]>
        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: 
[EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]

Reply via email to