hi all!
have a little question...

code:

OutputStream out = new BufferedOutputStream(new FileOutpuStream(targetFile));
GetMethod get = new GetMethod();
HttpClient.getInstance().executeMethod(get);
InputStream in = get.getResponseBodyAsStream();
/* do some job */
out.flush();
out.close(); // works fine, takes 0 millis if testing

in.close(); // this block takes about 48 seconds!!
get.releaseConnection();

look at last 2 lines of code. may be i'm doing something wrong? using
MultiThreaded and need multi-threaded application. there was something in
documentation that i dont need to release
connections - HttpClient will try to reuse it. ok, thats good, but what to do
with inputStream.close() ? i dont need even to close inputStream?

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

Reply via email to