public class FormDataSet extends OutputRepresentation
UNKNOWN_SIZE
Constructor and Description |
---|
FormDataSet()
Default constructor, creates a single part form.
|
FormDataSet(Representation formRepresentation)
Constructor.
|
FormDataSet(java.lang.String multipartBoundary)
Creates a multipart form.
|
Modifier and Type | Method and Description |
---|---|
FormData |
add(java.lang.String name,
java.lang.String value)
Adds a new form data entry.
|
java.lang.String |
encode()
Encodes the form using the standard HTML form encoding mechanism and the
UTF-8 character set.
|
java.lang.String |
encode(boolean queryString)
Encodes the form using the standard URI encoding mechanism and the UTF-8
character set.
|
java.lang.String |
encode(char separator,
boolean queryString)
URL encodes the form.
|
Series<FormData> |
getEntries()
Returns the modifiable series of form entries.
|
java.lang.String |
getMatrixString()
Formats the form as a matrix path string.
|
java.lang.String |
getMultipartBoundary()
Returns the boundary separating multipart entries.
|
java.lang.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(java.lang.String boundary)
Sets the boundary separating multipart entries.
|
void |
write(java.io.OutputStream outputStream) |
getChannel, getStream
getReader, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public FormDataSet()
public FormDataSet(Representation formRepresentation)
formRepresentation
- The representation to parse.public FormDataSet(java.lang.String multipartBoundary)
multipartBoundary
- The boundary separating multipart entries.public FormData add(java.lang.String name, java.lang.String value)
name
- The entry name.value
- The entry value.getEntries()
.public java.lang.String encode() throws java.io.IOException
java.io.IOException
public java.lang.String encode(boolean queryString) throws java.io.IOException
queryString
- True if the target is a query string.java.io.IOException
public java.lang.String encode(char separator, boolean queryString) throws java.io.IOException
separator
- The separator character to append between parameters.queryString
- True if the target is a query string.java.io.IOException
public Series<FormData> getEntries()
public java.lang.String getMatrixString()
public java.lang.String getMultipartBoundary()
public java.lang.String getQueryString()
public boolean isMultipart()
public void setMultipart(boolean multipart)
multipart
- True if the form is multipart encoded.public void setMultipartBoundary(java.lang.String boundary)
boundary
- The boundary separating multipart entries.public void write(java.io.OutputStream outputStream) throws java.io.IOException
write
in class Representation
java.io.IOException
Copyright © 2005-2020 Restlet.