Class AbstractCssScanner

java.lang.Object
org.jhotdraw8.css.parser.AbstractCssScanner
All Implemented Interfaces:
CssScanner
Direct Known Subclasses:
CharSequenceCssScanner, ReaderCssScanner

public abstract class AbstractCssScanner extends Object implements CssScanner
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    The current character.
    protected long
    The current line number in the input stream.
    protected long
    The current position in the input stream.
    protected boolean
    Whether we need to skip a linefeed on the next read.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the current character.
    long
    Returns the line number in the input stream.
    long
    Returns the position in the input stream.
    int
    Phase 2: Processes unicode escape sequences first, and then processes newlines.
    protected abstract int
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.jhotdraw8.css.parser.CssScanner

    pushBack
  • Field Details

    • position

      protected long position
      The current position in the input stream.
    • lineNumber

      protected long lineNumber
      The current line number in the input stream. An input stream starts with line number 1.
    • currentChar

      protected int currentChar
      The current character.
    • skipLF

      protected boolean skipLF
      Whether we need to skip a linefeed on the next read.
  • Constructor Details

    • AbstractCssScanner

      public AbstractCssScanner()
  • Method Details

    • currentChar

      public int currentChar()
      Description copied from interface: CssScanner
      Returns the current character.
      Specified by:
      currentChar in interface CssScanner
      Returns:
      the current character
    • getLineNumber

      public long getLineNumber()
      Description copied from interface: CssScanner
      Returns the line number in the input stream.
      Specified by:
      getLineNumber in interface CssScanner
      Returns:
      the line number
    • read

      protected abstract int read() throws IOException
      Throws:
      IOException
    • nextChar

      public int nextChar() throws IOException
      Description copied from interface: CssScanner
      Phase 2: Processes unicode escape sequences first, and then processes newlines.
      Specified by:
      nextChar in interface CssScanner
      Returns:
      the next character. Returns -1 if EOF.
      Throws:
      IOException - from the underlying input stream
    • getPosition

      public long getPosition()
      Description copied from interface: CssScanner
      Returns the position in the input stream.
      Specified by:
      getPosition in interface CssScanner
      Returns:
      the position