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()
String
getContentType()
InputStream
getInputStream()
String
getName()
String
getOriginalFilename()
long
getSize()
boolean
isEmpty()
void
transferTo(File dest)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.multipart.MultipartFile
getResource, transferTo
-
Constructor Details
-
Method Details
-
getName
- Specified by:
getName
in interfaceMultipartFile
-
getBytes
- Specified by:
getBytes
in interfaceMultipartFile
- Throws:
IOException
-
getContentType
- Specified by:
getContentType
in interfaceMultipartFile
-
getInputStream
- Specified by:
getInputStream
in interfaceInputStreamSource
- Specified by:
getInputStream
in interfaceMultipartFile
- Throws:
IOException
-
getOriginalFilename
- Specified by:
getOriginalFilename
in interfaceMultipartFile
-
getSize
public long getSize()- Specified by:
getSize
in interfaceMultipartFile
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMultipartFile
-
transferTo
- Specified by:
transferTo
in interfaceMultipartFile
- Throws:
IOException
IllegalStateException
-