Package com.gsitm.ustra.java.mvc.utils
Class UstraMultipartFileResource
java.lang.Object
org.springframework.core.io.AbstractResource
com.gsitm.ustra.java.mvc.utils.UstraMultipartFileResource
- All Implemented Interfaces:
org.springframework.core.io.InputStreamSource,org.springframework.core.io.Resource
public class UstraMultipartFileResource
extends org.springframework.core.io.AbstractResource
-
Constructor Summary
ConstructorsConstructorDescriptionUstraMultipartFileResource(org.springframework.web.multipart.MultipartFile multipartFile) -
Method Summary
Modifier and TypeMethodDescriptionlongbooleanbooleanexists()This implementation always returnstrue.This implementation returns a description that has the Multipart name.This implementation throws IllegalStateException if attempting to read the underlying stream multiple times.inthashCode()booleanisOpen()This implementation always returnstrue.Methods inherited from class org.springframework.core.io.AbstractResource
createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isFile, isReadable, lastModified, readableChannel, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString
-
Constructor Details
-
UstraMultipartFileResource
public UstraMultipartFileResource(org.springframework.web.multipart.MultipartFile multipartFile)
-
-
Method Details
-
exists
public boolean exists()This implementation always returnstrue.- Specified by:
existsin interfaceorg.springframework.core.io.Resource- Overrides:
existsin classorg.springframework.core.io.AbstractResource
-
isOpen
public boolean isOpen()This implementation always returnstrue.- Specified by:
isOpenin interfaceorg.springframework.core.io.Resource- Overrides:
isOpenin classorg.springframework.core.io.AbstractResource
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceorg.springframework.core.io.Resource- Overrides:
contentLengthin classorg.springframework.core.io.AbstractResource
-
getFilename
- Specified by:
getFilenamein interfaceorg.springframework.core.io.Resource- Overrides:
getFilenamein classorg.springframework.core.io.AbstractResource
-
getInputStream
This implementation throws IllegalStateException if attempting to read the underlying stream multiple times.- Throws:
IOExceptionIllegalStateException
-
getDescription
This implementation returns a description that has the Multipart name. -
equals
- Overrides:
equalsin classorg.springframework.core.io.AbstractResource
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.springframework.core.io.AbstractResource
-