com.Verisign.payment
Class ParameterList

java.lang.Object
  extended bycom.Verisign.payment.ParameterList

public class ParameterList
extends java.lang.Object

Support class for parameter lists in name/value pairs.


Constructor Summary
ParameterList(java.lang.String newStream)
          Create a new parameter stream.
 
Method Summary
 java.lang.String getCurrentName()
          Get the name portion of the last parameter parsed by parseNextNameValuePair().
 java.lang.String getCurrentValue()
          Get the value portion of the last parameter parsed by parseNextNameValuePair().
 boolean parseNextNameValuePair()
          Cycle through the Name/Value pair response string setting the local name and value strings.
static int validate(java.lang.String parmList, java.lang.StringBuffer validationError)
          Ensure that an input stream is a correctly formatted set of Name/Value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterList

public ParameterList(java.lang.String newStream)
Create a new parameter stream.

Parameters:
newStream - the string on which this ParameterStream is to be based.
Method Detail

getCurrentName

public java.lang.String getCurrentName()
Get the name portion of the last parameter parsed by parseNextNameValuePair().

Returns:
the last parsed name.

getCurrentValue

public java.lang.String getCurrentValue()
Get the value portion of the last parameter parsed by parseNextNameValuePair().

Returns:
the last parsed value.

validate

public static int validate(java.lang.String parmList,
                           java.lang.StringBuffer validationError)
Ensure that an input stream is a correctly formatted set of Name/Value pairs.

Parameters:
parmList - the stream to be validated.
Returns:
null if the list formatted correctly or a String indicating the formatting problem.

parseNextNameValuePair

public boolean parseNextNameValuePair()
Cycle through the Name/Value pair response string setting the local name and value strings. At the end of the string, return false and reset itself to start reading from the beginning of the string. The parsed name/value pair can be retrieved through the getCurrentName and getCurrentValue functions.

Returns:
false when there are no more pairs.