UnicodeEscapingReader (Groovy 2.4.12)
Date: 2017-06-21

org.codehaus.groovy.antlr

## Class UnicodeEscapingReader

- java.lang.Object
- - java.io.Reader
  - - org.codehaus.groovy.antlr.UnicodeEscapingReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, Readable

      public class UnicodeEscapingReader
      extends Reader

  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.

- - ### Field Summary

    - ### Fields inherited from class java.io.Reader

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UnicodeEscapingReader(Reader reader, SourceBuffer sourceBuffer)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Closes this reader by calling close on the underlying reader.
    `int` | `getUnescapedUnicodeColumnCount()`
    `int` | `getUnescapedUnicodeOffsetCount()`
    `int` | `read()` Gets the next character from the underlying reader, translating escapes as required.
    `int` | `read(char[] cbuf, int off, int len)` Reads characters from the underlying reader.
    `void` | `setLexer(CharScanner lexer)` Sets the lexer that is using this reader.

    - ### Methods inherited from class java.io.Reader

      `mark, markSupported, read, read, ready, reset, skip`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UnicodeEscapingReader

          public UnicodeEscapingReader(Reader reader,
                                       SourceBuffer sourceBuffer)

      Constructor.
      Parameters:
        `reader` - The reader that this reader will filter over.

  - ### Method Detail

    - #### setLexer

          public void setLexer(CharScanner lexer)

      Sets the lexer that is using this reader. Must be called before the lexer is used.

    - #### read

          public int read(char[] cbuf,
                          int off,
                          int len)
                   throws IOException

      Reads characters from the underlying reader.
      Specified by:
        `read` in class `Reader`
      Throws:
        `IOException`
      See Also:
        `Reader.read(char[],int,int)`

    - #### read

          public int read()
                   throws IOException

      Gets the next character from the underlying reader, translating escapes as required.
      Overrides:
        `read` in class `Reader`
      Throws:
        `IOException`
      See Also:
        `Reader.close()`

    - #### getUnescapedUnicodeColumnCount

          public int getUnescapedUnicodeColumnCount()

    - #### getUnescapedUnicodeOffsetCount

          public int getUnescapedUnicodeOffsetCount()

    - #### close

          public void close()
                     throws IOException

      Closes this reader by calling close on the underlying reader.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Specified by:
        `close` in class `Reader`
      Throws:
        `IOException`
      See Also:
        `Reader.close()`