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

    Constructors
    Constructor
    Description
    UstraMultipartFileResource(org.springframework.web.multipart.MultipartFile multipartFile)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    boolean
    equals(Object other)
     
    boolean
    This implementation always returns true.
    This implementation returns a description that has the Multipart name.
     
    This implementation throws IllegalStateException if attempting to read the underlying stream multiple times.
    int
     
    boolean
    This implementation always returns true.

    Methods inherited from class org.springframework.core.io.AbstractResource

    createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isFile, isReadable, lastModified, readableChannel, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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 returns true.
      Specified by:
      exists in interface org.springframework.core.io.Resource
      Overrides:
      exists in class org.springframework.core.io.AbstractResource
    • isOpen

      public boolean isOpen()
      This implementation always returns true.
      Specified by:
      isOpen in interface org.springframework.core.io.Resource
      Overrides:
      isOpen in class org.springframework.core.io.AbstractResource
    • contentLength

      public long contentLength()
      Specified by:
      contentLength in interface org.springframework.core.io.Resource
      Overrides:
      contentLength in class org.springframework.core.io.AbstractResource
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in interface org.springframework.core.io.Resource
      Overrides:
      getFilename in class org.springframework.core.io.AbstractResource
    • getInputStream

      public InputStream getInputStream() throws IOException, IllegalStateException
      This implementation throws IllegalStateException if attempting to read the underlying stream multiple times.
      Throws:
      IOException
      IllegalStateException
    • getDescription

      public String getDescription()
      This implementation returns a description that has the Multipart name.
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class org.springframework.core.io.AbstractResource
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.springframework.core.io.AbstractResource