- All Implemented Interfaces:
- org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource
public class NamedByteArrayResource
extends org.springframework.core.io.ByteArrayResource
Extends ByteArrayResource to implement getFilename so that it's possible to represent files with byte arrays.
This is necessary so that FormHttpMessageConverter#getFilename returns a String instead of null (which is the
default return of Resource#getFilename). Then HttpHeaders#setContentDispositionFormData correctly includes
"; filename=" in the Content-Disposition header during FormHttpMessageConverted#writePart.