public class FormData extends java.lang.Object implements NamedValue<java.lang.String>
| Constructor and Description |
|---|
FormData(NamedValue<java.lang.String> namedValue)
Constructor.
|
FormData(java.lang.String name,
Representation valueRepresentation)
Constructor.
|
FormData(java.lang.String name,
java.lang.String value)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(java.lang.Appendable buffer,
boolean queryString)
Encodes the parameter into the target buffer.
|
java.lang.String |
encode(boolean queryString)
Encodes the parameter as a string.
|
Disposition |
getDisposition()
Returns the content disposition of the value representation.
|
java.lang.String |
getFilename()
Returns the file name of the value representation.
|
MediaType |
getMediaType()
Returns the media type of the value representation.
|
java.lang.String |
getName()
Returns the name of the associated form control.
|
java.lang.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(java.lang.String name)
Sets the name of the associated form control.
|
void |
setValue(java.lang.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.
|
java.lang.String |
toString() |
public FormData(NamedValue<java.lang.String> namedValue)
namedValue - public FormData(java.lang.String name,
Representation valueRepresentation)
name - valueRepresentation - public FormData(java.lang.String name,
java.lang.String value)
name - value - public void encode(java.lang.Appendable buffer,
boolean queryString)
throws java.io.IOException
buffer - The target buffer.queryString - True if the target is a query string.java.io.IOExceptionpublic java.lang.String encode(boolean queryString)
throws java.io.IOException
queryString - True if the target is a query string.java.io.IOExceptionpublic Disposition getDisposition()
public java.lang.String getFilename()
Disposition.getFilename() method is invoked.public MediaType getMediaType()
public java.lang.String getName()
getName in interface NamedValue<java.lang.String>public java.lang.String getValue()
getValue in interface NamedValue<java.lang.String>public Representation getValueRepresentation()
public void setName(java.lang.String name)
name - The name of the associated form control.public void setValue(java.lang.String value)
setValue in interface NamedValue<java.lang.String>value - The textual value of the associated form control.public void setValueRepresentation(Representation valueRepresentation)
valueRepresentation - The value of the associated form control.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005-2024 Restlet.