public class Scanner extends Object
| Modifier and Type | Field and Description |
|---|---|
protected char |
ch0
Current character in stream
|
protected char |
ch1
1 character lookahead
|
protected char |
ch2
2 character lookahead
|
protected char |
ch3
3 character lookahead
|
protected char[] |
content
Characters to scan.
|
protected int |
limit
Scan limit.
|
protected int |
position
Position in content.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Scanner(char[] content,
int start,
int length)
Constructor
|
protected |
Scanner(String content)
Constructor
Scan content from beginning to end.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
atEOF()
Returns true of scanner is at end of input
|
protected char |
charAt(int i)
Get the ith character from the content.
|
protected String |
getContents() |
protected void |
reset(int i)
Reset to a character position.
|
protected void |
skip(int n)
Skip ahead a number of characters.
|
protected final char[] content
protected int position
protected final int limit
protected char ch0
protected char ch1
protected char ch2
protected char ch3
protected Scanner(char[] content,
int start,
int length)
content - content to scanstart - position index in content where to startlength - length of inputprotected Scanner(String content)
content - content to scanprotected final boolean atEOF()
protected final char charAt(int i)
i - Index of character.protected final void reset(int i)
i - Position in content.protected final void skip(int n)
n - Number of characters to skip.protected String getContents()