PHP
·
发表于 5年以前
·
阅读量:8392
package com.hbk
import java.nio.file.Files
import java.nio.file.Paths
fun main(args: Array<String>) {
val stream = Files.newInputStream(Paths.get("D:\\test.txt"))
stream.buffered().reader().use { reader -> println(reader.readText()) }
}