|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.ext.html.FormData
public class FormData
HTML form data composed of a name and a value. The value is typically a string but can also be a full fledged representation for multipart form (such as a binary file uploaded).
Constructor Summary | |
---|---|
FormData(NamedValue<String> namedValue)
Constructor. |
|
FormData(String name,
Representation valueRepresentation)
Constructor. |
|
FormData(String name,
String value)
Constructor. |
Method Summary | |
---|---|
void |
encode(Appendable buffer,
boolean queryString)
Encodes the parameter into the target buffer. |
String |
encode(boolean queryString)
Encodes the parameter as a string. |
Disposition |
getDisposition()
Returns the content disposition of the value representation. |
String |
getFilename()
Returns the file name of the value representation. |
MediaType |
getMediaType()
Returns the media type of the value representation. |
String |
getName()
Returns the name of the associated form control. |
String |
getValue()
Returns the textual value of the associated form control. |
Representation |
getValueRepresentation()
Returns the value of the associated form control, either textual or binary. |
void |
setName(String name)
Sets the name of the associated form control. |
void |
setValue(String value)
Sets the textual value of the associated form control. |
void |
setValueRepresentation(Representation valueRepresentation)
Sets the value of the associated form control as a full fledged representation. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FormData(NamedValue<String> namedValue)
namedValue
- public FormData(String name, Representation valueRepresentation)
name
- valueRepresentation
- public FormData(String name, String value)
name
- value
- Method Detail |
---|
public String encode(boolean queryString) throws IOException
queryString
- True if the target is a query string.
IOException
public void encode(Appendable buffer, boolean queryString) throws IOException
buffer
- The target buffer.queryString
- True if the target is a query string.
IOException
public Disposition getDisposition()
public String getFilename()
Disposition.getFilename()
method is invoked.
public MediaType getMediaType()
public String getName()
getName
in interface NamedValue<String>
public String getValue()
getValue
in interface NamedValue<String>
public Representation getValueRepresentation()
public void setName(String name)
name
- The name of the associated form control.public void setValue(String value)
setValue
in interface NamedValue<String>
value
- The textual value of the associated form control.public void setValueRepresentation(Representation valueRepresentation)
valueRepresentation
- The value of the associated form control.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |