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
Creates a new
FileReader, given the
File to read from.
|
FileReader(java
Creates a new
FileReader, given the
FileDescriptor to read from.
|
FileReader(String
Creates a new
FileReader, given the name of the file to read from.
|
close, getEncoding, read, read, readypublic FileReader(StringfileName) throws FileNotFoundException
fileName - the name of the file to read from
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.
public FileReader(Filefile) throws FileNotFoundException
file - the
File to read from
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.
public FileReader(java.io .FileDescriptor fd)
fd - the FileDescriptor to read from