Package org.forgerock.opendj.ldap
Class GserParser
java.lang.Object
org.forgerock.opendj.ldap.GserParser
This class implements a parser for strings which are encoded using the
Generic String Encoding Rules (GSER) defined in RFC 3641.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasNext()
Determines if the GSER String contains at least one character to be read.Returns the next element as a BigInteger.Return the identifier of the next IdentifiedChoiceValue element.int
Returns the next element as an Integer.Returns the identifier of the next NamedValue element.Returns the next element as a String.Skips the input matching the end of a sequence and preceding space characters.Skips the input matching the start of a sequence and subsequent space characters.skipMsp()
Skips the input matching one or more space characters.Skips the input matching the separator pattern (",") and subsequenct space characters.skipSp()
Skips the input matching zero, one or more space characters.toString()
Returns the GSER encoded String value.
-
Constructor Details
-
GserParser
Creates a new GSER Parser.- Parameters:
value
- the GSER encoded String value
-
-
Method Details
-
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 orfalse
otherwise.
-
skipSp
Skips the input matching zero, one or more space characters.- Returns:
- reference to this GSERParser
- Throws:
DecodeException
- If no match could be found
-
skipMsp
Skips the input matching one or more space characters.- Returns:
- reference to this GSERParser
- Throws:
DecodeException
- If no match could be found
-
readStartSequence
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
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
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
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
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
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
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
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
Returns the GSER encoded String value.
-