Closeable
, AutoCloseable
, Readable
public class FileReader extends InputStreamReader
FileReader
is meant for reading streams of characters.
For reading streams of raw bytes, consider using a
FileInputStream
.
InputStreamReader
,
FileInputStream
Constructor | Description |
---|---|
FileReader(File file) |
Creates a new
FileReader , given the File
to read from. |
FileReader(FileDescriptor fd) |
Creates a new
FileReader , given the
FileDescriptor to read from. |
FileReader(String fileName) |
Creates a new
FileReader , given the name of the
file to read from. |
public FileReader(String fileName) throws FileNotFoundException
FileReader
, given the name of the
file to read from.fileName
- the name of the file to read fromFileNotFoundException
- if the named file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.public FileReader(File file) throws FileNotFoundException
FileReader
, given the File
to read from.file
- the File
to read fromFileNotFoundException
- if the file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.public FileReader(FileDescriptor fd)
FileReader
, given the
FileDescriptor
to read from.fd
- the FileDescriptor to read from 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, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps