摘要: 1. eachLine -- 打开和读取文件的每一行new File("foo.txt").eachLine { println it.toUpperCase();}2. readLines -- 其作用基本与 eachLine 相同,但它不接受闭包为参数,而是把文件行读到一个 List 中l... 阅读全文
posted @ 2015-09-07 10:32 Alan1109 阅读(11715) 评论(0) 推荐(0) 编辑