Spring Integration

org.springframework.integration.http
Class SimpleMultipartFileReader

java.lang.Object
  extended by org.springframework.integration.http.SimpleMultipartFileReader
All Implemented Interfaces:
MultipartFileReader<Object>

public class SimpleMultipartFileReader
extends Object
implements MultipartFileReader<Object>

MultipartFileReader implementation that does not maintain metadata from the original MultipartFile instance. Instead this simply reads the file content directly as either a String or byte array depending on the Content-Type.

Since:
2.0
Author:
Mark Fisher

Constructor Summary
SimpleMultipartFileReader()
           
 
Method Summary
 Object readMultipartFile(MultipartFile multipartFile)
          Reads MultipartFile content.
 void setDefaultMultipartCharset(String defaultCharset)
          Specify the default charset name to use when converting multipart file content into Strings if the multipart itself does not provide a charset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMultipartFileReader

public SimpleMultipartFileReader()
Method Detail

setDefaultMultipartCharset

public void setDefaultMultipartCharset(String defaultCharset)
Specify the default charset name to use when converting multipart file content into Strings if the multipart itself does not provide a charset.


readMultipartFile

public Object readMultipartFile(MultipartFile multipartFile)
                         throws IOException
Description copied from interface: MultipartFileReader
Reads MultipartFile content.

Specified by:
readMultipartFile in interface MultipartFileReader<Object>
Throws:
IOException

Spring Integration

Copyright © 2010. All Rights Reserved.