优雅关闭流
以前:
finally { if (in != null) { try { in.close(); } catch (IOException e) { LOGGER.warn("Fail to close stream : ", e); } } if (out != null) { try { out.close(); } catch (IOException e) { LOGGER.warn("Fail to close stream : ", e); } } }
现在:
finally { IOUtils.closeQuietly(in); IOUtils.closeQuietly(out); }
-_-