public class QueryStringParser
extends java.lang.Object
| Constructor and Description |
|---|
QueryStringParser(java.lang.String queryString)
Construct a parser from the given URL query string.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName()
Get the name of the current parameter.
|
java.lang.String |
getValue()
Get the value of the current parameter.
|
boolean |
next()
Move to the next parameter in the query string.
|
boolean |
search(java.util.Collection<java.lang.String> names)
Search for a parameter with a name in a given collection.
|
public QueryStringParser(java.lang.String queryString)
queryString - the query string, i.e. the part of the URL starting
after the '?' characterpublic boolean next()
true if a parameter has been found;
false if there are no more parameterspublic boolean search(java.util.Collection<java.lang.String> names)
names - public java.lang.String getName()
next() has been called
previously and the result of this call was true. Otherwise the
result of this method is undefined.public java.lang.String getValue()
next() has been called
previously and the result of this call was true. Otherwise the
result of this method is undefined.Copyright © 2004-2024 The Apache Software Foundation. All Rights Reserved.