public class FileReader extends FileWrapper
charset, file| 构造器和说明 |
|---|
FileReader(File file,
Charset charset)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
close(Closeable closeable)
关闭
关闭失败不会抛出异常 |
static FileReader |
create(File file,
Charset charset)
创建 FileReader
|
<T extends Collection<String>> |
readLines(T collection)
从文件中读取每一行数据
|
getCharset, getFile, setCharset, setFilepublic FileReader(File file, Charset charset) throws IOException
IOExceptionpublic static FileReader create(File file, Charset charset) throws IOException
IOExceptionpublic <T extends Collection<String>> T readLines(T collection) throws IOException
IOException - IO异常public static void close(Closeable closeable)
Copyright © 2023 tan. All rights reserved.