Interface OperationRequestPart
public interface OperationRequestPart
A part of a multipart request.
- Author:
- Andy Wilkinson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the contents of the part.Returns the content of the part as aString
.org.springframework.http.HttpHeaders
Returns the part's headers.getName()
Returns the name of the part.@Nullable String
Returns the name of the file that is being uploaded in this part.
-
Method Details
-
getName
-
getSubmittedFileName
@Nullable String getSubmittedFileName()Returns the name of the file that is being uploaded in this part.- Returns:
- the name of the file, or
null
if the part has no file name
-
getContent
byte[] getContent()Returns the contents of the part.- Returns:
- the contents
-
getContentAsString
String getContentAsString()Returns the content of the part as aString
. If the part has no content an empty string is returned. If the part has aContent-Type
header that specifies a charset then that charset will be used when converting the contents to aString
.- Returns:
- the contents as string, never
null
-
getHeaders
org.springframework.http.HttpHeaders getHeaders()Returns the part's headers.- Returns:
- the headers
-