Sorry, I find out the answer to my question.

On 8/8/07, ying lcs <[EMAIL PROTECTED]> wrote:
> Hi,
>
> if I have a url,http://127.0.0.1:8080/filedownload, which returns a
> GIF.  How to save a file from a http connection using http client?
> how can i save what I get from http after i call executeMethod?
>
>
>    String loadUrl = "http://127.0.0.1:8080/filedownload";;
>
>            GetMethod method = new GetMethod(loadUrl);
>
>            try {
>                        // Execute the method.
>                          int statusCode = client.executeMethod(method);
>
>                          if (statusCode != HttpStatus.SC_OK) {
>                            System.err.println("Method failed: " +
> method.getStatusLine());
>                          }
>
>                } catch (Throwable e) {
>

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

Reply via email to