public class UploadedMultipartFile
extends java.lang.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,
java.lang.String contentType,
java.lang.String formParameterName,
java.lang.String originalFilename) |
UploadedMultipartFile(java.io.File file,
long size,
java.lang.String contentType,
java.lang.String formParameterName,
java.lang.String originalFilename) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes() |
java.lang.String |
getContentType() |
java.io.InputStream |
getInputStream() |
java.lang.String |
getName() |
java.lang.String |
getOriginalFilename() |
long |
getSize() |
boolean |
isEmpty() |
void |
transferTo(java.io.File dest) |
public UploadedMultipartFile(java.io.File file, long size, java.lang.String contentType, java.lang.String formParameterName, java.lang.String originalFilename)
public UploadedMultipartFile(byte[] bytes, java.lang.String contentType, java.lang.String formParameterName, java.lang.String originalFilename)
public java.lang.String getName()
getName
in interface org.springframework.web.multipart.MultipartFile
public byte[] getBytes() throws java.io.IOException
getBytes
in interface org.springframework.web.multipart.MultipartFile
java.io.IOException
public java.lang.String getContentType()
getContentType
in interface org.springframework.web.multipart.MultipartFile
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface org.springframework.web.multipart.MultipartFile
java.io.IOException
public java.lang.String getOriginalFilename()
getOriginalFilename
in interface org.springframework.web.multipart.MultipartFile
public long getSize()
getSize
in interface org.springframework.web.multipart.MultipartFile
public boolean isEmpty()
isEmpty
in interface org.springframework.web.multipart.MultipartFile
public void transferTo(java.io.File dest) throws java.io.IOException, java.lang.IllegalStateException
transferTo
in interface org.springframework.web.multipart.MultipartFile
java.io.IOException
java.lang.IllegalStateException