Use try with resource.
增加安全性