Class ScannerInputReader

java.lang.Object
java.io.Reader
java.io.FilterReader
org.glassfish.rmic.tools.java.ScannerInputReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable, Constants, RuntimeConstants

public class ScannerInputReader extends FilterReader implements Constants
An input stream for java programs. The stream treats either "\n", "\r" or "\r\n" as the end of a line, it always returns \n. It also parses UNICODE characters expressed as ￿. However, if it sees "\\", the second slash cannot begin a unicode sequence. It keeps track of the current position in the input stream. WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.
  • Field Details

    • env

    • pos

      long pos
    • chpos

      private long chpos
    • pushBack

      private int pushBack
    • BUFFERLEN

      private static final int BUFFERLEN
      See Also:
    • buffer

      private final char[] buffer
    • currentIndex

      private int currentIndex
    • numChars

      private int numChars
  • Constructor Details

  • Method Details

    • getNextChar

      private int getNextChar() throws IOException
      Get the next character from our buffer. Note: this method has been inlined by hand in the `read' method below. Any changes made to this method should be equally applied to that code.
      Throws:
      IOException
    • read

      public int read(char[] buffer, int off, int len)
      Overrides:
      read in class FilterReader
    • read

      public int read() throws IOException
      Overrides:
      read in class FilterReader
      Throws:
      IOException