Translates GLS-defined unicode escapes into characters. Throws an exception in the event of an invalid unicode escape being detected.
No attempt has been made to optimize this class for speed or space.
Constructor and description |
---|
UnicodeEscapingReader
(Reader reader, SourceBuffer sourceBuffer) Constructor. |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
close() Closes this reader by calling close on the underlying reader. |
|
int |
getUnescapedUnicodeColumnCount() |
|
int |
getUnescapedUnicodeOffsetCount() |
|
int |
read(char[] cbuf, int off, int len) Reads characters from the underlying reader. |
|
int |
read() Gets the next character from the underlying reader, translating escapes as required. |
|
void |
setLexer(CharScanner lexer) Sets the lexer that is using this reader. |
Constructor.
reader
- The reader that this reader will filter over.Closes this reader by calling close on the underlying reader.
Reads characters from the underlying reader.
Gets the next character from the underlying reader, translating escapes as required.
Sets the lexer that is using this reader. Must be called before the lexer is used.
Copyright © 2003-2020 The Apache Software Foundation. All rights reserved.