Step into Kotlin - 21 - I/O
来源:互联网 发布:通达信炒股软件编程 编辑:程序博客网 时间:2024/06/14 15:17
目录
- IO 操作
- 读取操作
- 逐行读取
- 读取到字符串中
- 读取操作
- IO 操作
摘要
读取行,读取字符串
IO 操作
读取操作
逐行读取
var source = File("coffeetime-kotlin/myfile.txt")val lines = source.readLines("UTF-8")for (l in lines) { println(l)}
读取到字符串中
val contents = source.readText("UTF-8")
0 0
- Step into Kotlin - 21 - I/O
- Step into Scala - 21 - I/O 操作与 Shell 操作
- Step into Kotlin
- Step into Kotlin - 01 - 入门
- Step into Kotlin - 02 - 数据类型
- Step into Kotlin - 04 - 函数
- Step into Kotlin - 06 - 异常
- Step into Kotlin - 08 - 数组
- Step into Kotlin - 09 - 集合
- Step into Kotlin - 11 - 类
- Step into Kotlin - 13 - 包
- Step into Kotlin - 14 - 继承
- Step into Kotlin - 15 - 注解
- Step into Kotlin - 17 - 泛型
- Step into Kotlin - 22 - Xml
- Step into Kotlin - 24 - delegate
- Kotlin I/O操作
- Step into Kotlin - 05 - 流程控制
- Raspberry vnc 连接
- 多列索引和多个单列索引
- WebService大讲堂之Axis2(1):用POJO实现0配置的WebService
- Activity和Fragment的生命周期
- java io 总结2
- Step into Kotlin - 21 - I/O
- HDU 1069 Monkey and Banana(DP)
- Ubuntu 下开发 Android 环境变量设置
- (10)unity入门,unity的应用VR、AR
- centos7 mariadb ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
- git diff git status 提交检查
- ios面试问题
- Haffman编码
- Linux 用户管理