public class EncodingFileReader extends InputStreamReader
FileReader
but allows for the specification of input encoding.| Constructor and Description |
|---|
EncodingFileReader(File file)
Creates a new EncodingFileReader, given the File
to read from, and using default of utf-8.
|
EncodingFileReader(FileDescriptor fd)
Creates a new FileReader, given the
FileDescriptor to read from.
|
EncodingFileReader(File file,
String encoding)
Creates a new FileReader, given the File
to read from and encoding.
|
EncodingFileReader(String fileName)
Creates a new EncodingFileReader, given the name of the
file to read from.
|
EncodingFileReader(String fileName,
String encoding)
Creates a new EncodingFileReader, given the name of the
file to read from and an encoding
|
close, getEncoding, read, read, readypublic EncodingFileReader(String fileName) throws UnsupportedEncodingException, FileNotFoundException
fileName - the name of the file to read fromFileNotFoundException - 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.UnsupportedEncodingException - if the encoding does not exist.public EncodingFileReader(String fileName, String encoding) throws UnsupportedEncodingException, FileNotFoundException
fileName - the name of the file to read fromencoding - String specifying the encoding to be usedUnsupportedEncodingException - if the encoding does not exist.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 EncodingFileReader(File file) throws UnsupportedEncodingException, FileNotFoundException
file - the File to read fromFileNotFoundException - if the file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.UnsupportedEncodingException - if the encoding does not exist.public EncodingFileReader(File file, String encoding) throws UnsupportedEncodingException, FileNotFoundException
file - the File to read fromencoding - String specifying the encoding to be usedFileNotFoundException - if the file does not exist,
is a directory rather than a regular file,
or for some other reason cannot be opened for
reading.UnsupportedEncodingException - if the encoding does not exist.public EncodingFileReader(FileDescriptor fd)
fd - the FileDescriptor to read from