Class UploadedMultipartFile
java.lang.Object
org.springframework.integration.http.multipart.UploadedMultipartFile
- All Implemented Interfaces:
InputStreamSource,MultipartFile
public class UploadedMultipartFile extends Object implements MultipartFile
A
MultipartFile implementation that represents an uploaded File.
The actual file content either exists in memory (in a byte array) or in a File.- Since:
- 2.0
- Author:
- Mark Fisher, Gary Russell
-
Constructor Summary
Constructors Constructor Description UploadedMultipartFile(byte[] bytes, String contentType, String formParameterName, String originalFilename)UploadedMultipartFile(File file, long size, String contentType, String formParameterName, String originalFilename) -
Method Summary
Modifier and Type Method Description byte[]getBytes()StringgetContentType()InputStreamgetInputStream()StringgetName()StringgetOriginalFilename()longgetSize()booleanisEmpty()voidtransferTo(File dest)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.multipart.MultipartFile
getResource, transferTo
-
Constructor Details
-
Method Details
-
getName
- Specified by:
getNamein interfaceMultipartFile
-
getBytes
- Specified by:
getBytesin interfaceMultipartFile- Throws:
IOException
-
getContentType
- Specified by:
getContentTypein interfaceMultipartFile
-
getInputStream
- Specified by:
getInputStreamin interfaceInputStreamSource- Specified by:
getInputStreamin interfaceMultipartFile- Throws:
IOException
-
getOriginalFilename
- Specified by:
getOriginalFilenamein interfaceMultipartFile
-
getSize
public long getSize()- Specified by:
getSizein interfaceMultipartFile
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceMultipartFile
-
transferTo
- Specified by:
transferToin interfaceMultipartFile- Throws:
IOExceptionIllegalStateException
-