AutoCloseable 类型的局部变量包装到 try-with-resources 语句中。