java.lang.Object | |||
↳ | java.io.Reader | ||
↳ | java.io.InputStreamReader | ||
↳ | java.io.FileReader |
A specialized
Reader
that reads from a file in the file system.
All read requests made by calling methods in this class are directly
forwarded to the equivalent function of the underlying operating system.
Since this may induce some performance penalty, in particular if many small
read requests are made, a FileReader is often wrapped by a
BufferedReader.
[Expand]
Inherited Fields
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.Reader
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Constructs a new FileReader on the given
file
.
|
||||||||||
|
Construct a new FileReader on the given FileDescriptor
fd
.
|
||||||||||
|
Construct a new FileReader on the given file named
filename
.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.InputStreamReader
|
|||||||||||
From class
java.io.Reader
|
|||||||||||
From class
java.lang.Object
|
|||||||||||
From interface
java.io.Closeable
|
|||||||||||
From interface
java.lang.AutoCloseable
|
|||||||||||
From interface
java.lang.Readable
|
Constructs a new FileReader on the given
file
.
file | a File to be opened for reading characters from. |
---|
FileNotFoundException |
if
file
does not exist.
|
---|
Construct a new FileReader on the given FileDescriptor
fd
. Since
a previously opened FileDescriptor is passed as an argument, no
FileNotFoundException can be thrown.
fd | the previously opened file descriptor. |
---|
Construct a new FileReader on the given file named
filename
.
filename | an absolute or relative path specifying the file to open. |
---|
FileNotFoundException |
if there is no file named
filename
.
|
---|