public class FormData extends Object implements NamedValue<String>
Constructor and Description |
---|
FormData(NamedValue<String> namedValue)
Constructor.
|
FormData(String name,
Representation valueRepresentation)
Constructor.
|
FormData(String name,
String value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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() |
public FormData(NamedValue<String> namedValue)
namedValue
- public FormData(String name, Representation valueRepresentation)
name
- valueRepresentation
- public void encode(Appendable buffer, boolean queryString) throws IOException
buffer
- The target buffer.queryString
- True if the target is a query string.IOException
public String encode(boolean queryString) throws IOException
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.Copyright © 2005–2018. All rights reserved.