Build 1.0_r1(from source)

java.io
Class FileReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.InputStreamReader
          extended by java.io.FileReader
All Implemented Interfaces:
Closeable, Readable

public class FileReader
extends InputStreamReader

FileReader is class for turning a file into a character Stream. Data read from the source is converted into characters. The encoding is assumed to 8859_1. The FileReader contains a buffer of bytes read from the source and converts these into characters as needed. The buffer size is 8K.

See Also:
FileWriter

Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.InputStreamReader
InputStreamReader.HistoricalNamesUtil
 
Field Summary
 
Fields inherited from class java.io.InputStreamReader
bytes, decoder
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
FileReader(File file)
          Construct a new FileReader on the given File file.
FileReader(FileDescriptor fd)
          Construct a new FileReader on the given FileDescriptor fd.
FileReader(String filename)
          Construct a new FileReader on the given file named filename.
 
Method Summary
 
Methods inherited from class java.io.InputStreamReader
close, getEncoding, read, read, ready
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileReader

public FileReader(File file)
           throws FileNotFoundException
Construct a new FileReader on the given File file. If the file specified cannot be found, throw a FileNotFoundException.

Parameters:
file - a File to be opened for reading characters from.
Throws:
FileNotFoundException - if the file cannot be opened for reading.

FileReader

public FileReader(FileDescriptor fd)
Construct a new FileReader on the given FileDescriptor fd. Since a previously opened FileDescriptor is passed as an argument, no FileNotFoundException is thrown.

Parameters:
fd - the previously opened file descriptor.

FileReader

public FileReader(String filename)
           throws FileNotFoundException
Construct a new FileReader on the given file named filename. If the filename specified cannot be found, throw a FileNotFoundException.

Parameters:
filename - an absolute or relative path specifying the file to open.
Throws:
FileNotFoundException - if the filename cannot be opened for reading.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature