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 and 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.
|
close, getEncoding, read, read, ready
public FileReader(String fileName) throws FileNotFoundException
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
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)
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, 2015, Oracle and/or its affiliates. All rights reserved.