FileDocCategorySizeDatePackage
FileReader.javaAPI DocAndroid 1.5 API2617Wed May 06 22:41:04 BST 2009java.io

FileReader

public class FileReader extends InputStreamReader
A specialized {@link 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.
see
BufferedReader
see
FileWriter
since
Android 1.0

Fields Summary
Constructors Summary
public FileReader(File file)
Constructs a new FileReader on the given {@code file}.

param
file a File to be opened for reading characters from.
throws
FileNotFoundException if {@code file} does not exist.
since
Android 1.0

        super(new FileInputStream(file));
    
public FileReader(FileDescriptor fd)
Construct a new FileReader on the given FileDescriptor {@code fd}. Since a previously opened FileDescriptor is passed as an argument, no FileNotFoundException can be thrown.

param
fd the previously opened file descriptor.
since
Android 1.0

        super(new FileInputStream(fd));
    
public FileReader(String filename)
Construct a new FileReader on the given file named {@code filename}.

param
filename an absolute or relative path specifying the file to open.
throws
FileNotFoundException if there is no file named {@code filename}.
since
Android 1.0

        super(new FileInputStream(filename));
    
Methods Summary