FileReaderNameFileReaderSynopsis
DescriptionThe FileReader class represents a character stream that reads data from a file. It is a subclass of InputStreamReader that uses a default buffer size (8192 bytes) to read bytes from a file and the default character encoding scheme to convert the bytes to characters. If you need to specify the character encoding or the buffer size, wrap an InputStreamReader around a FileInputStream. The file can be specified using a FileDescriptor, a File object, or a String that represents a pathname. All of the constructors can throw a SecurityException if the application does not have permission to read from the specified file. FileReader provides a low-level interface for reading character data from a file. You should think about wrapping a FileReader with a BufferedReader to increase reading efficiency. If you need to read binary data from a file, you should use a FileInputStream wrapped by a DataInputStream instead. Class Summary
public class java.io.FileReader extends java.io.InputStreamReader { // Constructors public FileReader(String fileName); public FileReader(File file); public FileReader(FileDescriptor fd); } ConstructorsFileInputStreampublic FileReader(String fileName) throws FileNotFoundException
public FileReader(File file) throws FileNotFoundException
public FileReader(FileDescriptor fdObj)
Inherited Methods
See AlsoBufferedReader, DataInputStream, File, FileDescriptor, FileInputStream, FileNotFoundException, InputStreamReader, IOException, NullPointerException, Reader, SecurityException |
|