Class 
Use 
SUMMARY: NESTED | FIELD | CONSTR | METHOD      DETAIL: FIELD | CONSTR | METHOD
FlexDoc/Javadoc 2.0
Demo Java Doc

java.base / java.io
Class FileReader
java.lang.Object
  java.io.Reader
      java.io.InputStreamReader
          java.io.FileReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class FileReader
extends InputStreamReader
Reads text from character files using a default buffer size. Decoding from bytes to characters uses either a specified charset or the platform's default charset.

The FileReader is meant for reading streams of characters. For reading streams of raw bytes, consider using a FileInputStream.

Since:
1.1
Author:
Mark Reinhold
See Also:
InputStreamReader, FileInputStream

Field Summary
Fields inherited from class java.io.Reader
lock
Constructor Summary
Creates a new FileReader, given the File to read, using the platform's default charset.
FileReader(File file, Charset charset)
Creates a new FileReader, given the File to read and the charset.
Creates a new FileReader, given the FileDescriptor to read, using the platform's default charset.
FileReader(String fileName)
Creates a new FileReader, given the name of the file to read, using the platform's default charset.
FileReader(String fileName, Charset charset)
Creates a new FileReader, given the name of the file to read and the charset.
Method Summary
Methods inherited from class java.io.InputStreamReader
close, getEncoding, read, read, read, ready
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, reset, skip, transferTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileReader
public FileReader
(String fileName)
throws
Creates a new FileReader, given the name of the file to read, using the platform's default charset.
Parameters:
fileName - the name of the file to read
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.

FileReader
public FileReader
(File file)
throws
Creates a new FileReader, given the File to read, using the platform's default charset.
Parameters:
file - the File to read
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
Creates a new FileReader, given the FileDescriptor to read, using the platform's default charset.
Parameters:
fd - the FileDescriptor to read

FileReader
public FileReader
(String fileName,
 Charset charset)
throws
Creates a new FileReader, given the name of the file to read and the charset.
Parameters:
fileName - the name of the file to read
charset - the charset
Throws:
IOException - 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.
Since:
11

FileReader
public FileReader
(File file,
 Charset charset)
throws
Creates a new FileReader, given the File to read and the charset.
Parameters:
file - the File to read
charset - the charset
Throws:
IOException - if the file does not exist, is a directory rather than a regular file, or for some other reason cannot be opened for reading.
Since:
11

 Class 
Use 
SUMMARY: NESTED | FIELD | CONSTR | METHOD      DETAIL: FIELD | CONSTR | METHOD
FlexDoc/Javadoc 2.0
Demo Java Doc

Java API documentation generated with FlexDoc/Javadoc 2.0 using JavadocClassic 3.0 template set.
FlexDoc/Javadoc is a template-driven programming tool for rapid development of any Javadoc-based Java API documentation generators (i.e. doclets). If you need to customize your Javadoc without writing a full-blown doclet from scratch, FlexDoc/Javadoc may be the only tool able to help you! Find out more at www.flexdoc.xyz