public class FormDataSet extends OutputRepresentation
UNKNOWN_SIZE| Constructor and Description |
|---|
FormDataSet()
Default constructor, creates a single part form.
|
FormDataSet(Representation formRepresentation)
Constructor.
|
FormDataSet(String multipartBoundary)
Creates a multipart form.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
getChannel, getStreamgetReader, write, writeappend, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransientgetModificationDate, getTag, setModificationDate, setTagcreateClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toStringpublic FormDataSet()
public FormDataSet(Representation formRepresentation)
formRepresentation - The representation to parse.public FormDataSet(String multipartBoundary)
multipartBoundary - The boundary separating multipart entries.public FormData add(String name, String value)
name - The entry name.value - The entry value.getEntries().public String encode() throws IOException
IOExceptionpublic String encode(boolean queryString) throws IOException
queryString - True if the target is a query string.IOExceptionpublic 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 RepresentationIOExceptionCopyright © 2005-2016 Restlet.