public static interface MultipartFormData.Pair
| Modifier and Type | Method and Description |
|---|---|
default java.util.Optional<File> |
fileValue()
Returns the form content segment value as a file.
|
default java.lang.String |
key()
Returns a string that represents the form content segment key.
|
static MultipartFormData.Pair |
of(java.lang.String key,
File value)
Returns the
Pair instance for the given key and value. |
static MultipartFormData.Pair |
of(java.lang.String key,
java.lang.String value)
Returns the
Pair instance for the given key and value. |
default java.util.Optional<java.lang.String> |
stringValue()
Returns the form content segment value as a string.
|
static MultipartFormData.Pair of(java.lang.String key, java.lang.String value)
Pair instance for the given key and value.
The key-value pair that represents a segment of a multi-part form data. Can contain values corresponding a form field content, an upload file content, etc.
key - the form content segment keyvalue - the string representing the form content segment value. Can be empty if the
key does not correspond to any value. For example, an empty
form fieldjava.lang.IllegalArgumentException - when key is empty or blankstatic MultipartFormData.Pair of(java.lang.String key, File value)
Pair instance for the given key and value.
The key-value pair that represents a segment of a multi-part form data. Can contain values corresponding a form field content, an upload file content, etc.
key - the form content segment key or blankvalue - the segment value representing the file contentjava.lang.IllegalArgumentException - when key is emptydefault java.lang.String key()
default java.util.Optional<java.lang.String> stringValue()
default java.util.Optional<File> fileValue()