This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
java.io
class FileReader
- All Implemented Interfaces:
- Closeable, Readable
-
Most common way to construct:
-
File inputFile = …;
FileReader reader = new FileReader(inputFile);
Based on 93 examples
public class FileReader
extends InputStreamReader
Convenience class for reading character files. The constructors of this
class assume that the default character encoding and the default byte-buffer
size are appropriate. To specify these values yourself, construct an
InputStreamReader on a FileInputStream.
FileReader
is meant for reading streams of characters.
For reading streams of raw bytes, consider using a
FileInputStream
.
- See Also (auto-generated):
-
BufferedReader
File
StringBuffer
Constructor Summary |
Creates a new FileReader, given the File
to read from.
|
Creates a new FileReader, given the
FileDescriptor to read from.
|
Creates a new FileReader, given the name of the
file to read from.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileReader
public FileReader(File file)
throws FileNotFoundException
-
Creates a new FileReader, given the File
to read from.
- Parameters:
file
- the File to read from
- Throws:
FileNotFoundException
- if the file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.
FileReader
public FileReader(FileDescriptor fd)
-
Creates a new FileReader, given the
FileDescriptor to read from.
- Parameters:
fd
- the FileDescriptor to read from
FileReader
public FileReader(String fileName)
throws FileNotFoundException
-
Creates a new FileReader, given the name of the
file to read from.
- Parameters:
fileName
- the name of the file to read from
- Throws:
FileNotFoundException
- 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.
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.