我正在后台线程中调用httpclient.execute()。当我中断线程时,是否抛出ioexception?
最佳答案
不,至少我从来没见过。请注意,您可以在从Thread.currentThread().isInterrupted()
复制时选中httpEntity.getContent()
来中断下载。
这里有更多关于在其他状态下关闭连接的讨论http://old.nabble.com/Close-interrupt-HTTP-connections-td30299655.html