Class FileCopyingMultipartFileReader
java.lang.Object
org.springframework.integration.http.multipart.FileCopyingMultipartFileReader
- All Implemented Interfaces:
- MultipartFileReader<MultipartFile>
public class FileCopyingMultipartFileReader
extends Object
implements MultipartFileReader<MultipartFile>
MultipartFileReader implementation that copies the MultipartFile's
 content to a new temporary File in the specified directory. If no directory
 is provided, the Files will be created in the default temporary directory.- Since:
- 2.0
- Author:
- Mark Fisher, Artyem Bilan
- 
Constructor SummaryConstructorsConstructorDescriptionCreate aFileCopyingMultipartFileReaderthat creates temporary Files in the default temporary directory.FileCopyingMultipartFileReader(File directory) Create aFileCopyingMultipartFileReaderthat creates temporary Files in the given directory.
- 
Method SummaryModifier and TypeMethodDescriptionreadMultipartFile(MultipartFile multipartFile) ReadMultipartFilecontent.voidSpecify the prefix to use for temporary files.voidSpecify the suffix to use for temporary files.
- 
Constructor Details- 
FileCopyingMultipartFileReaderpublic FileCopyingMultipartFileReader()Create aFileCopyingMultipartFileReaderthat creates temporary Files in the default temporary directory.
- 
FileCopyingMultipartFileReaderCreate aFileCopyingMultipartFileReaderthat creates temporary Files in the given directory.- Parameters:
- directory- The directory.
 
 
- 
- 
Method Details- 
setPrefixSpecify the prefix to use for temporary files.- Parameters:
- prefix- The prefix.
 
- 
setSuffixSpecify the suffix to use for temporary files.- Parameters:
- suffix- The suffix.
 
- 
readMultipartFileDescription copied from interface:MultipartFileReaderReadMultipartFilecontent.- Specified by:
- readMultipartFilein interface- MultipartFileReader<MultipartFile>
- Parameters:
- multipartFile- The multipart file.
- Returns:
- The result of reading the file.
- Throws:
- IOException- Any IOException.
 
 
-