Class ParseState

java.lang.Object
com.itextpdf.kernel.xmp.impl.ParseState

class ParseState extends Object
Since:
22.08.2006
  • Field Details

    • str

      private String str
    • pos

      private int pos
  • Constructor Details

    • ParseState

      public ParseState(String str)
      Parameters:
      str - initializes the parser container
  • Method Details

    • 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(String errorMsg, int maxValue) throws XMPException
      Parses 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 found
      maxValue - the max value of the number to return
      Returns:
      Returns the parsed integer.
      Throws:
      XMPException - Thrown if no integer can be found.