Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.util
Class CharScanner

    java.lang.Object
      |
      +--com.caucho.util.CharScanner

public class CharScanner
extends java.lang.Object

A scanner for simple delimiter based parsing.

Constructor Summary
`CharScanner(java.lang.String delimiters)` Creates a compiled character scanner.

Method Summary
`char` | `scan(CharCursor cursor)` Scans characters from a cursor, until reaching the delimiter
`char` | `scan(CharCursor cursor, CharBuffer buf)` Scans characters from a cursor, filling a char buffer.
`char` | `skip(CharCursor cursor)` Skips characters from the cursor until one matches a delimiter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CharScanner

    public CharScanner(java.lang.String delimiters)

  Creates a compiled character scanner.
  Parameters:
    `delimiters` - string containing the delimiters

Method Detail

### skip

    public char skip(CharCursor cursor)

  Skips characters from the cursor until one matches a delimiter.
  Parameters:
    `cursor` - CharCursor to scan.
  Returns:
    the last character read

### scan

    public char scan(CharCursor cursor,
                     CharBuffer buf)

  Scans characters from a cursor, filling a char buffer.
  Parameters:
    `cursor` - CharCursor to scan.
    `buf` - CharBuffer to fill.
  Returns:
    the last character read

### scan

    public char scan(CharCursor cursor)

  Scans characters from a cursor, until reaching the delimiter
  Parameters:
    `cursor` - CharCursor to scan.
  Returns:
    the last character read

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD