public class UploadedMultipartFile extends Object implements 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResource, transferTo
public UploadedMultipartFile(File file, long size, String contentType, String formParameterName, String originalFilename)
public String getName()
getName
in interface MultipartFile
public byte[] getBytes() throws IOException
getBytes
in interface MultipartFile
IOException
public String getContentType()
getContentType
in interface MultipartFile
public InputStream getInputStream() throws IOException
getInputStream
in interface InputStreamSource
getInputStream
in interface MultipartFile
IOException
public String getOriginalFilename()
getOriginalFilename
in interface MultipartFile
public long getSize()
getSize
in interface MultipartFile
public boolean isEmpty()
isEmpty
in interface MultipartFile
public void transferTo(File dest) throws IOException, IllegalStateException
transferTo
in interface MultipartFile
IOException
IllegalStateException