Package com.itextpdf.xmp.impl
Class ParseState
- java.lang.Object
-
- com.itextpdf.xmp.impl.ParseState
-
class ParseState extends java.lang.Object- Since:
- 22.08.2006
-
-
Constructor Summary
Constructors Constructor Description ParseState(java.lang.String str)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description charch()charch(int index)intgatherInt(java.lang.String errorMsg, int maxValue)Parses a integer from the source and sets the pointer after it.booleanhasNext()intlength()intpos()voidskip()Skips the next char.
-
-
-
Method Detail
-
length
public int length()
- Returns:
- Returns the length of the input.
-
hasNext
public boolean hasNext()
- Returns:
- Returns whether there are more chars to come.
-
ch
public char ch(int index)
- Parameters:
index- index of char- Returns:
- Returns char at a certain index.
-
ch
public char ch()
- Returns:
- Returns the current char or 0x0000 if there are no more chars.
-
skip
public void skip()
Skips the next char.
-
pos
public int pos()
- Returns:
- Returns the current position.
-
gatherInt
public int gatherInt(java.lang.String errorMsg, int maxValue) throws XMPExceptionParses a integer from the source and sets the pointer after it.- Parameters:
errorMsg- Error message to put in the exception if no number can be foundmaxValue- the max value of the number to return- Returns:
- Returns the parsed integer.
- Throws:
XMPException- Thrown if no integer can be found.
-
-