public class UploadedMultipartFile extends Object implements org.springframework.web.multipart.MultipartFile
MultipartFile implementation that represents an uploaded File.
The actual file content either exists in memory (in a byte array) or in a File.| Constructor and Description |
|---|
UploadedMultipartFile(byte[] bytes,
String contentType,
String formParameterName,
String originalFilename) |
UploadedMultipartFile(File file,
long size,
String contentType,
String formParameterName,
String originalFilename) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes() |
String |
getContentType() |
InputStream |
getInputStream() |
String |
getName() |
String |
getOriginalFilename() |
long |
getSize() |
boolean |
isEmpty() |
void |
transferTo(File dest) |
public UploadedMultipartFile(File file, long size, String contentType, String formParameterName, String originalFilename)
public String getName()
getName in interface org.springframework.web.multipart.MultipartFilepublic byte[] getBytes()
throws IOException
getBytes in interface org.springframework.web.multipart.MultipartFileIOExceptionpublic String getContentType()
getContentType in interface org.springframework.web.multipart.MultipartFilepublic InputStream getInputStream() throws IOException
getInputStream in interface org.springframework.core.io.InputStreamSourcegetInputStream in interface org.springframework.web.multipart.MultipartFileIOExceptionpublic String getOriginalFilename()
getOriginalFilename in interface org.springframework.web.multipart.MultipartFilepublic long getSize()
getSize in interface org.springframework.web.multipart.MultipartFilepublic boolean isEmpty()
isEmpty in interface org.springframework.web.multipart.MultipartFilepublic void transferTo(File dest) throws IOException, IllegalStateException
transferTo in interface org.springframework.web.multipart.MultipartFileIOExceptionIllegalStateException