|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.representation.StreamRepresentation
org.restlet.representation.OutputRepresentation
org.restlet.ext.html.FormDataSet
public class FormDataSet
HTML form supporting either URL encoding or multipart encoding.
| Field Summary |
|---|
| Fields inherited from class org.restlet.representation.Representation |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
FormDataSet()
Default constructor, creates a single part form. |
|
FormDataSet(Representation formRepresentation)
Constructor. |
|
FormDataSet(String multipartBoundary)
Creates a multipart form. |
|
| Method Summary | |
|---|---|
FormData |
add(String name,
String value)
Adds a new form data entry. |
String |
encode()
Encodes the form using the standard HTML form encoding mechanism and the UTF-8 character set. |
String |
encode(boolean queryString)
Encodes the form using the standard URI encoding mechanism and the UTF-8 character set. |
String |
encode(char separator,
boolean queryString)
URL encodes the form. |
Series<FormData> |
getEntries()
Returns the modifiable series of form entries. |
String |
getMatrixString()
Formats the form as a matrix path string. |
String |
getMultipartBoundary()
Returns the boundary separating multipart entries. |
String |
getQueryString()
Formats the form as a query string. |
boolean |
isMultipart()
Indicates if the form is multipart encoded. |
void |
setMultipart(boolean multipart)
Indicates if the form is multipart encoded. |
void |
setMultipartBoundary(String boundary)
Sets the boundary separating multipart entries. |
void |
write(OutputStream outputStream)
|
| Methods inherited from class org.restlet.representation.OutputRepresentation |
|---|
getChannel, getStream |
| Methods inherited from class org.restlet.representation.StreamRepresentation |
|---|
getReader, write, write |
| Methods inherited from class org.restlet.representation.Representation |
|---|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient |
| Methods inherited from class org.restlet.representation.RepresentationInfo |
|---|
getModificationDate, getTag, setModificationDate, setTag |
| Methods inherited from class org.restlet.representation.Variant |
|---|
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormDataSet()
public FormDataSet(Representation formRepresentation)
formRepresentation - The representation to parse.public FormDataSet(String multipartBoundary)
multipartBoundary - The boundary separating multipart entries.| Method Detail |
|---|
public FormData add(String name,
String value)
name - The entry name.value - The entry value.
getEntries().
public String encode()
throws IOException
IOException
public String encode(boolean queryString)
throws IOException
queryString - True if the target is a query string.
IOException
public String encode(char separator,
boolean queryString)
throws IOException
separator - The separator character to append between parameters.queryString - True if the target is a query string.
IOExceptionpublic Series<FormData> getEntries()
public String getMatrixString()
public String getMultipartBoundary()
public String getQueryString()
public boolean isMultipart()
public void setMultipart(boolean multipart)
multipart - True if the form is multipart encoded.public void setMultipartBoundary(String boundary)
boundary - The boundary separating multipart entries.
public void write(OutputStream outputStream)
throws IOException
write in class RepresentationIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||