3
我在后台线程中调用HttpClient.execute()。当我中断线程时它抛出IOException吗?如果HttpClient.execute()中断会发生什么?
我在后台线程中调用HttpClient.execute()。当我中断线程时它抛出IOException吗?如果HttpClient.execute()中断会发生什么?
不,至少我从未见过它这样做。请注意,从httpEntity.getContent()
复制时,您可以通过检查Thread.currentThread().isInterrupted()
来中断下载。
有一个在这里的其他国家http://old.nabble.com/Close-interrupt-HTTP-connections-td30299655.html
将停止excuting我猜关闭连接更多的讨论。每次。没有例外的你打电话多少次。它会每次都停下来。 – iamserious 2010-09-13 14:06:53
你有没有试过吗? – 2010-09-13 14:08:22
我会......当我有时间的时候;) – fhucho 2010-09-15 10:31:27