TextReader
The TextReader object, returned by the openTextReader() function, allows to open, parse, read and close a text file. (See: openTextReader().)
Methods
The following table describes the methods of the TextReader object.
| Property/method | Description |
|---|---|
| close() | Closes the stream and releases resources. |
| open(inStream, inEncoding) | Creates a reader from an input stream. Parameters:
|
| open(inFileName, inEncoding) | Creates a reader on the specified file. Parameters:
|
| parseCharset(inEncoding) |
Returns a character set (Charset). Character sets are used to convert a binary data file into readable text. Parameters:
|
| read() | Reads and returns the next character, or -1 if the end of the stream has been reached. |
| readLine() | Reads and returns the next line, or null if the end of the stream has been reached. |
| skip(offset) | Skips the specified number of characters. Parameters:
|