org.springframework.integration.http.multipart
Class UploadedMultipartFile
java.lang.Object
org.springframework.integration.http.multipart.UploadedMultipartFile
- All Implemented Interfaces:
- org.springframework.web.multipart.MultipartFile
public class UploadedMultipartFile
- extends java.lang.Object
- implements org.springframework.web.multipart.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
Constructor Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UploadedMultipartFile
public UploadedMultipartFile(java.io.File file,
long size,
java.lang.String contentType,
java.lang.String formParameterName,
java.lang.String originalFilename)
UploadedMultipartFile
public UploadedMultipartFile(byte[] bytes,
java.lang.String contentType,
java.lang.String formParameterName,
java.lang.String originalFilename)
getName
public java.lang.String getName()
- Specified by:
getName
in interface org.springframework.web.multipart.MultipartFile
getBytes
public byte[] getBytes()
throws java.io.IOException
- Specified by:
getBytes
in interface org.springframework.web.multipart.MultipartFile
- Throws:
java.io.IOException
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface org.springframework.web.multipart.MultipartFile
getInputStream
public java.io.InputStream getInputStream()
throws java.io.IOException
- Specified by:
getInputStream
in interface org.springframework.web.multipart.MultipartFile
- Throws:
java.io.IOException
getOriginalFilename
public java.lang.String getOriginalFilename()
- Specified by:
getOriginalFilename
in interface org.springframework.web.multipart.MultipartFile
getSize
public long getSize()
- Specified by:
getSize
in interface org.springframework.web.multipart.MultipartFile
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface org.springframework.web.multipart.MultipartFile
transferTo
public void transferTo(java.io.File dest)
throws java.io.IOException,
java.lang.IllegalStateException
- Specified by:
transferTo
in interface org.springframework.web.multipart.MultipartFile
- Throws:
java.io.IOException
java.lang.IllegalStateException