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.Constructor and Description |
---|
SimpleMultipartFileReader() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void setDefaultMultipartCharset(String defaultCharset)
defaultCharset
- The default charset.public Object readMultipartFile(MultipartFile multipartFile) throws IOException
MultipartFileReader
MultipartFile
content.readMultipartFile
in interface MultipartFileReader<Object>
multipartFile
- The multipart file.IOException
- Any IOException.