Class LockssMultipartHttpServletRequest.LockssMultipartFile

java.lang.Object
org.lockss.laaws.rs.multipart.LockssMultipartHttpServletRequest.LockssMultipartFile
All Implemented Interfaces:
Serializable, org.springframework.core.io.InputStreamSource, org.springframework.web.multipart.MultipartFile
Enclosing class:
LockssMultipartHttpServletRequest

public static class LockssMultipartHttpServletRequest.LockssMultipartFile extends Object implements org.springframework.web.multipart.MultipartFile, Serializable
LOCKSS implementation of a Spring MultipartFile adapter, wrapping a LOCKSS Servlet Part object (see LockssMultipartHttpServletRequest.LockssApplicationPart). The goal of this class is to expose the part digest and X-Lockss-Content-Type header if present. Adapted from StandardMultipartHttpServletRequest.StandardMultipartFile.
See Also:
  • Constructor Details

    • LockssMultipartFile

      public LockssMultipartFile(org.lockss.laaws.rs.multipart.LockssMultipartHttpServletRequest.LockssApplicationPart part, String filename)
  • Method Details

    • getDigest

      public MessageDigest getDigest()
    • getName

      public String getName()
      Specified by:
      getName in interface org.springframework.web.multipart.MultipartFile
    • getOriginalFilename

      public String getOriginalFilename()
      Specified by:
      getOriginalFilename in interface org.springframework.web.multipart.MultipartFile
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface org.springframework.web.multipart.MultipartFile
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.springframework.web.multipart.MultipartFile
    • getSize

      public long getSize()
      Specified by:
      getSize in interface org.springframework.web.multipart.MultipartFile
    • getBytes

      public byte[] getBytes() throws IOException
      Specified by:
      getBytes in interface org.springframework.web.multipart.MultipartFile
      Throws:
      IOException
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface org.springframework.core.io.InputStreamSource
      Specified by:
      getInputStream in interface org.springframework.web.multipart.MultipartFile
      Throws:
      IOException
    • transferTo

      public void transferTo(File dest) throws IOException, IllegalStateException
      Specified by:
      transferTo in interface org.springframework.web.multipart.MultipartFile
      Throws:
      IOException
      IllegalStateException
    • transferTo

      public void transferTo(Path dest) throws IOException, IllegalStateException
      Specified by:
      transferTo in interface org.springframework.web.multipart.MultipartFile
      Throws:
      IOException
      IllegalStateException