Class GserParser

    • Constructor Detail

      • GserParser

        public GserParser​(CharSequence 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 DecodeException
        Skips the input matching zero, one or more space characters.
        Returns:
        reference to this GSERParser
        Throws:
        DecodeException - If no match could be found
      • skipMsp

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

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

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

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

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

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

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

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

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

        public String toString()
        Returns the GSER encoded String value.
        Overrides:
        toString in class Object
        Returns:
        The GSER encoded String value.