Package com.teamdev.jxbrowser.net
Interface MultipartFormData.Pair
- Enclosing interface:
- MultipartFormData
public static interface MultipartFormData.Pair
A 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.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the form content segment value as a file.default String
key()
Returns a string that represents the form content segment key.static MultipartFormData.Pair
Returns thePair
instance for the givenkey
andvalue
.static MultipartFormData.Pair
Returns thePair
instance for the givenkey
andvalue
.Returns the form content segment value as a string.
-
Method Details
-
of
Returns thePair
instance for the givenkey
andvalue
.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.
- Parameters:
key
- the form content segment keyvalue
- the string representing the form content segment value. Can be empty if thekey
does not correspond to anyvalue
. For example, an empty form field- Throws:
IllegalArgumentException
- whenkey
is empty or blank
-
of
Returns thePair
instance for the givenkey
andvalue
.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.
- Parameters:
key
- the form content segment key or blankvalue
- the segment value representing the file content- Throws:
IllegalArgumentException
- whenkey
is empty
-
key
Returns a string that represents the form content segment key. -
stringValue
Returns the form content segment value as a string. -
fileValue
Returns the form content segment value as a file.
-