public class Matcher
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
end()
Returns the end position of the latest match.
|
boolean |
hasReadEndOfString()
Checks if the end of the string was encountered during the last
match attempt.
|
boolean |
isCaseInsensitive()
Checks if this matcher compares in case-insensitive mode.
|
int |
length()
Returns the length of the latest match.
|
boolean |
matchFrom(int pos)
Attempts to find a match starting at the specified position in
the string.
|
boolean |
matchFromBeginning()
Attempts to find a match starting at the beginning of the
string.
|
void |
reset()
Resets the information about the last match.
|
void |
reset(ReaderBuffer buffer)
Resets the matcher for use with a new look-ahead character
input buffer.
|
void |
reset(java.lang.String str)
Resets the matcher for use with a new input string.
|
int |
start()
Returns the start position of the latest match.
|
java.lang.String |
toString()
Returns the latest matched string.
|
public boolean isCaseInsensitive()
public void reset()
public void reset(java.lang.String str)
str
- the new string to work withpublic void reset(ReaderBuffer buffer)
buffer
- the character input streampublic int start()
public int end()
public int length()
public boolean hasReadEndOfString()
public boolean matchFromBeginning() throws java.io.IOException
java.io.IOException
- if an I/O error occurred while reading an
input streampublic boolean matchFrom(int pos) throws java.io.IOException
pos
- the starting position of the matchjava.io.IOException
- if an I/O error occurred while reading an
input streampublic java.lang.String toString()
toString
in class java.lang.Object