`

java.net.SocketException: Software caused connection abort: socket write error

    博客分类:
  • bug
阅读更多

资源关闭最好放在finally块中,否则容易出现资源缓慢泄漏

try {

  ...

} catch (){

  ...

} finally {

  if (fis!=null) fis.close();

  if (os!=null) os.close();

}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics