public class CharacterStream extends Object
Constructor and Description |
---|
CharacterStream(String input)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areNext(char... values)
Returns true if the next N characters in the stream are equal to the sequence of
characters provided.
|
String |
get(int startIndex,
int endIndex)
Gets the token value represented by the given range.
|
boolean |
hasNext()
Returns true if there are more characters in the stream.
|
int |
index()
Returns the current index into the stream.
|
boolean |
isNext(char... values)
Returns true if the next character in the stream is equal to any of the given
characters.
|
boolean |
isNext(String values)
Returns true if the next character in the stream is any of the characters
included in the given string.
|
boolean |
isNextNumeric()
Returns true if the next character in the stream is a valid numeric character.
|
boolean |
isNextNumericStart()
Returns true if the next character in the stream is a valid start character for
a numeric.
|
boolean |
isNextValidXmlNcNameCharacter()
Returns true if the next character in the stream is a valid XML NCName
character.
|
char |
next()
Reads the next character in the stream and returns it.
|
public CharacterStream(String input)
input
- public boolean hasNext()
public char next()
public boolean isNext(String values)
values
- public boolean isNext(char... values)
values
- public boolean isNextNumericStart()
public boolean isNextNumeric()
public boolean isNextValidXmlNcNameCharacter()
public boolean areNext(char... values)
values
- public int index()
public String get(int startIndex, int endIndex)
startIndex
- endIndex
- Copyright © 2011–2015 JBoss, a division of Red Hat. All rights reserved.