public class FormReader extends Object
| Constructor and Description |
|---|
FormReader(Representation representation)
Constructor.
In case the representation does not define a character set, the UTF-8 character set is used. |
FormReader(Representation representation,
boolean decode)
Constructor.
In case the representation does not define a character set, the UTF-8 character set is used. |
FormReader(String parametersString,
char separator)
Constructor.
|
FormReader(String parametersString,
CharacterSet characterSet,
char separator)
Constructor.
|
FormReader(String parametersString,
CharacterSet characterSet,
char separator,
boolean decode)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameters(Series<Parameter> parameters)
Adds the parameters into a given series.
|
Form |
read()
Reads all the parameters.
|
Parameter |
readFirstParameter(String name)
Reads the first parameter with the given name.
|
Parameter |
readNextParameter()
Reads the next parameter available or null.
|
Object |
readParameter(String name)
Reads the parameters with the given name.
|
void |
readParameters(Map<String,Object> parameters)
Reads the parameters whose name is a key in the given map.
|
public FormReader(Representation representation) throws IOException
representation - The web form content.IOException - if the stream of the representation could not be opened.public FormReader(Representation representation, boolean decode) throws IOException
representation - The web form content.decode - Indicates if the parameters should be decoded using the
given character set.IOException - if the stream of the representation could not be opened.public FormReader(String parametersString, char separator)
parametersString - The parameters string.separator - The separator character used between parameters.public FormReader(String parametersString, CharacterSet characterSet, char separator)
parametersString - The parameters string.characterSet - The supported character encoding. Set to null to
leave the data encoded.separator - The separator character used between parameters.public FormReader(String parametersString, CharacterSet characterSet, char separator, boolean decode)
parametersString - The parameters string.characterSet - The supported character encoding. Set to null to
leave the data encoded.separator - The separator character used between parameters.decode - Indicates if the parameters should be decoded using
the given character set.public void addParameters(Series<Parameter> parameters)
parameters - The target parameter series.public Form read() throws IOException
IOException - If the parameters could not be read.public Parameter readFirstParameter(String name) throws IOException
name - The parameter name to match.IOExceptionpublic Parameter readNextParameter() throws IOException
IOException - If the next parameter could not be read.public Object readParameter(String name) throws IOException
name - The parameter name to match.IOException - If the parameters could not be read.public void readParameters(Map<String,Object> parameters) throws IOException
parameters - The parameters map controlling the reading.IOException - If the parameters could not be read.Copyright © 2005–2025. All rights reserved.