public class FileReader extends InputStreamReader
FileReader是读取字符流。读取原始字节流,考虑使用FileInputStream。
InputStreamReader,
FileInputStream
| Constructor and Description |
|---|
FileReader(File file)
创建一个新的
FileReader,给予
File读。
|
FileReader(FileDescriptor fd)
创建一个新的
FileReader,给予
FileDescriptor读。
|
FileReader(String fileName)
创建一个新的
FileReader,给定要读取的文件的名称。
|
close, getEncoding, read, read, readypublic FileReader(String fileName) throws FileNotFoundException
fileName -文件名读取
FileNotFoundException -如果指定的文件不存在,是一个目录而不是常规文件,或者其他原因不能打开阅读。
public FileReader(File file) throws FileNotFoundException
file -
File读
FileNotFoundException -如果文件不存在,是一个目录而不是常规文件,或者其他原因不能打开阅读。
public FileReader(FileDescriptor fd)
fd -要读取的FileDescriptor
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.