public class FileReader extends InputStreamReader
| Constructor and Description |
|---|
FileReader(FileDescriptor fd,
String charset)
Creates a new FileReader, given the
FileDescriptor to read from.
|
FileReader(File file,
String charset)
Creates a new FileReader, given the File instance to read from.
|
FileReader(String filename,
String charset)
Creates a new FileReader, given the name of the file to read from.
|
close, getEncoding, read, read, readypublic FileReader(String filename, String charset) throws IOException
filename - the name of the file to read fromcharset - the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.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.IOExceptionpublic FileReader(File file, String charset) throws IOException
file - the File to read fromcharset - the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.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.IOExceptionpublic FileReader(FileDescriptor fd, String charset) throws IOException
fd - the FileDescriptor to read fromcharset - the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.IOExceptionCopyright © 2018. All rights reserved.