Class GSERParser

    • Constructor Detail

      • GSERParser

        public GSERParser​(String value)
        Creates a new GSER Parser.
        Parameters:
        value - the GSER encoded String value
    • Method Detail

      • hasNext

        public boolean hasNext()
        Determines if the GSER String contains at least one character to be read.
        Returns:
        true if there is at least one remaining character or false otherwise.
      • skipSP

        public GSERParser skipSP()
                          throws GSERException
        Skips the input matching zero, one or more space characters.
        Returns:
        reference to this GSERParser
        Throws:
        GSERException - If no match could be found
      • skipMSP

        public GSERParser skipMSP()
                           throws GSERException
        Skips the input matching one or more space characters.
        Returns:
        reference to this GSERParser
        Throws:
        GSERException - If no match could be found
      • readStartSequence

        public GSERParser readStartSequence()
                                     throws GSERException
        Skips the input matching the start of a sequence and subsequent space characters.
        Returns:
        reference to this GSERParser
        Throws:
        GSERException - If the input does not match the start of a sequence
      • readEndSequence

        public GSERParser readEndSequence()
                                   throws GSERException
        Skips the input matching the end of a sequence and preceding space characters.
        Returns:
        reference to this GSERParser
        Throws:
        GSERException - If the input does not match the end of a sequence
      • skipSeparator

        public GSERParser skipSeparator()
                                 throws GSERException
        Skips the input matching the separator pattern (",") and subsequenct space characters.
        Returns:
        reference to this GSERParser
        Throws:
        GSERException - If the input does not match the separator pattern.
      • nextString

        public String nextString()
                          throws GSERException
        Returns the next element as a String.
        Returns:
        the input matching the String pattern
        Throws:
        GSERException - If the input does not match the string pattern.
      • nextInteger

        public int nextInteger()
                        throws GSERException
        Returns the next element as an Integer.
        Returns:
        the input matching the integer pattern
        Throws:
        GSERException - If the input does not match the integer pattern
      • nextBigInteger

        public BigInteger nextBigInteger()
                                  throws GSERException
        Returns the next element as a BigInteger.
        Returns:
        the input matching the integer pattern
        Throws:
        GSERException - If the input does not match the integer pattern
      • nextNamedValueIdentifier

        public String nextNamedValueIdentifier()
                                        throws GSERException
        Returns the identifier of the next NamedValue element.
        Returns:
        the identifier of the NamedValue element
        Throws:
        GSERException - If the input does not match the identifier pattern of a NamedValue
      • nextChoiceValueIdentifier

        public String nextChoiceValueIdentifier()
                                         throws GSERException
        Return the identifier of the next IdentifiedChoiceValue element.
        Returns:
        the identifier of the IdentifiedChoiceValue element
        Throws:
        GSERException - If the input does not match the identifier pattern of an IdentifiedChoiceValue