|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 optimise this class for speed or space.
Field Summary | |
---|---|
boolean |
hasNextChar
|
CharScanner |
lexer
|
int |
nextChar
|
Reader |
reader
|
SourceBuffer |
sourceBuffer
|
Constructor Summary | |
UnicodeEscapingReader(Reader reader, SourceBuffer sourceBuffer)
Constructor. |
Method Summary | |
---|---|
void |
checkHexDigit(int c)
Checks that the given character is indeed a hex digit. |
void |
close()
Closes this reader by calling close on the underlying reader. |
int |
read(def 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. |
void |
write(int c)
|
Constructor Detail |
---|
public UnicodeEscapingReader(Reader reader, SourceBuffer sourceBuffer)
Method Detail |
---|
void checkHexDigit(int c)
public void close()
public int read(def cbuf, int off, int len)
public int read()
public void setLexer(CharScanner lexer)
void write(int c)