|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Reader
java.io.InputStreamReader
edu.stanford.nlp.io.EncodingFileReader
public class EncodingFileReader
This is a convenience class which works almost exactly like
FileReader
but allows for the specification of input encoding.
Field Summary |
---|
Fields inherited from class java.io.Reader |
---|
lock |
Constructor Summary | |
---|---|
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 |
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 |
---|
public EncodingFileReader(String fileName) throws UnsupportedEncodingException, FileNotFoundException
fileName
- the name of the file to read from
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.
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 used
UnsupportedEncodingException
- 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 from
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.
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 used
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.
UnsupportedEncodingException
- if the encoding does not exist.public EncodingFileReader(FileDescriptor fd)
fd
- the FileDescriptor to read from
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |