Spring Integration

org.springframework.integration.http
Class UploadedMultipartFile

java.lang.Object
  extended by org.springframework.integration.http.UploadedMultipartFile
All Implemented Interfaces:
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

Constructor Summary
UploadedMultipartFile(byte[] bytes, String contentType, String formParameterName, String originalFilename)
           
UploadedMultipartFile(File file, long size, String contentType, String formParameterName, String originalFilename)
           
 
Method Summary
 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
 

Constructor Detail

UploadedMultipartFile

public UploadedMultipartFile(File file,
                             long size,
                             String contentType,
                             String formParameterName,
                             String originalFilename)

UploadedMultipartFile

public UploadedMultipartFile(byte[] bytes,
                             String contentType,
                             String formParameterName,
                             String originalFilename)
Method Detail

getName

public String getName()
Specified by:
getName in interface MultipartFile

getBytes

public byte[] getBytes()
                throws IOException
Specified by:
getBytes in interface MultipartFile
Throws:
IOException

getContentType

public String getContentType()
Specified by:
getContentType in interface MultipartFile

getInputStream

public InputStream getInputStream()
                           throws IOException
Specified by:
getInputStream in interface MultipartFile
Throws:
IOException

getOriginalFilename

public String getOriginalFilename()
Specified by:
getOriginalFilename in interface MultipartFile

getSize

public long getSize()
Specified by:
getSize in interface MultipartFile

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface MultipartFile

transferTo

public void transferTo(File dest)
                throws IOException,
                       IllegalStateException
Specified by:
transferTo in interface MultipartFile
Throws:
IOException
IllegalStateException

Spring Integration

Copyright © 2010. All Rights Reserved.