类 CommonsMultipartFile
java.lang.Object
cn.sinozg.applet.common.suport.CommonsMultipartFile
- 所有已实现的接口:
Serializable,org.springframework.core.io.InputStreamSource,org.springframework.web.multipart.MultipartFile
public class CommonsMultipartFile
extends Object
implements org.springframework.web.multipart.MultipartFile, Serializable
COPY spring CommonsMultipartFile
- 从以下版本开始:
- 2024-01-07 12:38
- 作者:
- xieyubin
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明private final org.apache.commons.fileupload.FileItemprotected static final org.apache.commons.logging.Logprivate booleanprivate final long -
构造器概要
构造器构造器说明CommonsMultipartFile(org.apache.commons.fileupload.FileItem fileItem) Create an instance wrapping the given FileItem. -
方法概要
修饰符和类型方法说明byte[]getBytes()final org.apache.commons.fileupload.FileItemReturn the underlyingorg.apache.commons.fileupload.FileIteminstance.getName()longgetSize()Return a description for the storage location of the multipart content.protected booleanDetermine whether the multipart content is still available.booleanisEmpty()voidsetPreserveFilename(boolean preserveFilename) Set whether to preserve the filename as sent by the client, not stripping off path information intoString()voidtransferTo(File dest) voidtransferTo(Path dest) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait从接口继承的方法 org.springframework.web.multipart.MultipartFile
getResource
-
字段详细资料
-
logger
protected static final org.apache.commons.logging.Log logger -
fileItem
private final org.apache.commons.fileupload.FileItem fileItem -
size
private final long size -
preserveFilename
private boolean preserveFilename
-
-
构造器详细资料
-
CommonsMultipartFile
public CommonsMultipartFile(org.apache.commons.fileupload.FileItem fileItem) Create an instance wrapping the given FileItem.- 参数:
fileItem- the FileItem to wrap
-
-
方法详细资料
-
getFileItem
public final org.apache.commons.fileupload.FileItem getFileItem()Return the underlyingorg.apache.commons.fileupload.FileIteminstance. There is hardly any need to access this. -
setPreserveFilename
public void setPreserveFilename(boolean preserveFilename) Set whether to preserve the filename as sent by the client, not stripping off path information inDefault is "false", stripping off path information that may prefix the actual filename e.g. from Opera. Switch this to "true" for preserving the client-specified filename as-is, including potential path separators.
- 从以下版本开始:
- 4.3.5
- 另请参阅:
-
getName
- 指定者:
getName在接口中org.springframework.web.multipart.MultipartFile
-
getOriginalFilename
- 指定者:
getOriginalFilename在接口中org.springframework.web.multipart.MultipartFile
-
getContentType
- 指定者:
getContentType在接口中org.springframework.web.multipart.MultipartFile
-
isEmpty
public boolean isEmpty()- 指定者:
isEmpty在接口中org.springframework.web.multipart.MultipartFile
-
getSize
public long getSize()- 指定者:
getSize在接口中org.springframework.web.multipart.MultipartFile
-
getBytes
public byte[] getBytes()- 指定者:
getBytes在接口中org.springframework.web.multipart.MultipartFile
-
getInputStream
- 指定者:
getInputStream在接口中org.springframework.core.io.InputStreamSource- 指定者:
getInputStream在接口中org.springframework.web.multipart.MultipartFile- 抛出:
IOException
-
transferTo
- 指定者:
transferTo在接口中org.springframework.web.multipart.MultipartFile- 抛出:
IOExceptionIllegalStateException
-
transferTo
- 指定者:
transferTo在接口中org.springframework.web.multipart.MultipartFile- 抛出:
IOExceptionIllegalStateException
-
isAvailable
protected boolean isAvailable()Determine whether the multipart content is still available. If a temporary file has been moved, the content is no longer available. -
getStorageDescription
Return a description for the storage location of the multipart content. Tries to be as specific as possible: mentions the file location in case of a temporary file. -
toString
-