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(String queryString,
char separator)
Constructor.
|
FormReader(String queryString,
CharacterSet characterSet,
char separator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntries(Series<FormData> entries)
Adds the entries into a given series.
|
Series<FormData> |
read()
Reads all the entries.
|
void |
readEntries(Map<String,Object> entries)
Reads the entries whose name is a key in the given map.
|
Object |
readEntry(String name)
Reads the entries with the given name.
|
FormData |
readFirstEntry(String name)
Reads the first entry with the given name.
|
FormData |
readNextEntry()
Reads the next entry available or null.
|
public FormReader(Representation representation) throws IOException
representation
- The web form content.IOException
- if the stream of the representation could not be opened.public FormReader(String queryString, char separator)
queryString
- The query string.public FormReader(String queryString, CharacterSet characterSet, char separator)
queryString
- The query string.characterSet
- The supported character encoding. Set to null to leave the
data encoded.public void addEntries(Series<FormData> entries)
entries
- The target series of entries.public Series<FormData> read() throws IOException
IOException
- If the entries could not be read.public void readEntries(Map<String,Object> entries) throws IOException
entries
- The entries map controlling the reading.IOException
- If the entries could not be read.public Object readEntry(String name) throws IOException
name
- The entry name to match.IOException
- If the entry could not be read.public FormData readFirstEntry(String name) throws IOException
name
- The entry name to match.IOException
public FormData readNextEntry() throws IOException
IOException
- If the next entry could not be read.Copyright © 2005–2014. All rights reserved.