FileReader class methods in Java

java.io.FileReader

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.

Implemented Interfaces:

Closeable

AutoCloseable

Readable

Some methods of FileReader class

FileReader(File)This method creates a new FileReader, given the File to read, using the platform's default charset.

FileReader(FileDescriptor)This method creates a new FileReader, given the FileDescriptor to read, using the platform's default charset.

FileReader(String)This method creates a new FileReader, given the name of the file to read, using the platform's default charset.

FileReader(File, Charset)This method creates a new FileReader, given the File to read and the charset.

FileReader(String, Charset)This method creates a new FileReader, given the name of the file to read and the charset.

No comments:

Post a Comment