Package cn.sinozg.applet.common.suport
Class StandardMultipartFile
java.lang.Object
cn.sinozg.applet.common.suport.StandardMultipartFile
- All Implemented Interfaces:
Serializable,org.springframework.core.io.InputStreamSource,org.springframework.web.multipart.MultipartFile
public class StandardMultipartFile
extends Object
implements org.springframework.web.multipart.MultipartFile, Serializable
Spring MultipartFile adapter, wrapping a Servlet Part object.
- Since:
- 2024-07-15 22:01
- Author:
- xyb
- See Also:
-
StandardMultipartHttpServletRequest- Serialized Form
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStandardMultipartFile(org.apache.commons.fileupload2.core.DiskFileItem fileItem, String filename) -
Method Summary
Modifier and TypeMethodDescriptionbyte @NotNull []getBytes()@NotNull InputStream@NotNull StringgetName()longgetSize()booleanisEmpty()voidtransferTo(@NotNull Path dest) voidtransferTo(File dest) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.web.multipart.MultipartFile
getResource
-
Field Details
-
fileItem
private final org.apache.commons.fileupload2.core.DiskFileItem fileItem -
filename
-
-
Constructor Details
-
StandardMultipartFile
public StandardMultipartFile(org.apache.commons.fileupload2.core.DiskFileItem fileItem, String filename)
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.springframework.web.multipart.MultipartFile
-
getOriginalFilename
- Specified by:
getOriginalFilenamein interfaceorg.springframework.web.multipart.MultipartFile
-
getContentType
- Specified by:
getContentTypein interfaceorg.springframework.web.multipart.MultipartFile
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceorg.springframework.web.multipart.MultipartFile
-
getSize
public long getSize()- Specified by:
getSizein interfaceorg.springframework.web.multipart.MultipartFile
-
getBytes
- Specified by:
getBytesin interfaceorg.springframework.web.multipart.MultipartFile- Throws:
IOException
-
getInputStream
- Specified by:
getInputStreamin interfaceorg.springframework.core.io.InputStreamSource- Specified by:
getInputStreamin interfaceorg.springframework.web.multipart.MultipartFile- Throws:
IOException
-
transferTo
- Specified by:
transferToin interfaceorg.springframework.web.multipart.MultipartFile- Throws:
IOExceptionIllegalStateException
-
transferTo
- Specified by:
transferToin interfaceorg.springframework.web.multipart.MultipartFile- Throws:
IOExceptionIllegalStateException
-