MultipartFile to org.springframework.core.io.Resource ,
exposing the content as InputStream and also overriding
contentLength() as well as getFilename().
MultipartFile#getResource()
| Modifier and Type | Field and Description |
|---|---|
| private final MultipartFile |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | contentLength()
Overrides org. Implements org. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides org. |
| public boolean | exists()
Overrides org. Implements org. true.
|
| public String | getDescription()
Implements org. |
| public String | getFilename()
Overrides org. Implements org. null,
assuming that this resource type does not have a filename.
|
| public InputStream | getInputStream()
Implements org. |
| public int | hashCode()
Overrides org. |
| public boolean | isOpen()
Overrides org. Overrides default org. true.
|
| multipartFile | back to summary |
|---|---|
| private final MultipartFile multipartFile | |
| MultipartFileResource | back to summary |
|---|---|
| public MultipartFileResource(MultipartFile multipartFile) | |
| contentLength | back to summary |
|---|---|
| public long contentLength() Overrides org. Implements org. Doc from org. This method reads the entire InputStream to determine the content length. For a custom subclass of
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides org. Doc from org. This implementation compares description strings.
| |
| exists | back to summary |
|---|---|
| public boolean exists() Overrides org. Implements org. This implementation always returns
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements org. This implementation returns a description that has the Multipart name.
| |
| getFilename | back to summary |
|---|---|
| public String getFilename() Overrides org. Implements org. Doc from org. This implementation always returns
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException, IllegalStateException Implements org. This implementation throws IllegalStateException if attempting to read the underlying stream multiple times.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from org. This implementation returns the description's hash code.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Overrides org. Overrides default org. This implementation always returns
| |