类 AbstractMultipartFile

java.lang.Object
cn.taketoday.web.multipart.support.AbstractMultipart
cn.taketoday.web.multipart.support.AbstractMultipartFile
所有已实现的接口:
cn.taketoday.core.io.InputStreamSource, Multipart, MultipartFile, Serializable
直接已知子类:
ServletPartMultipartFile

public abstract class AbstractMultipartFile extends AbstractMultipart implements MultipartFile
从以下版本开始:
3.0
作者:
TODAY 2021/4/18 20:38
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • cachedBytes

      protected byte[] cachedBytes
  • 构造器详细资料

    • AbstractMultipartFile

      public AbstractMultipartFile()
  • 方法详细资料

    • transferTo

      public void transferTo(File dest) throws IOException
      从接口复制的说明: MultipartFile
      Transfer the received file to the given destination file.

      This may either move the file in the filesystem, copy the file in the filesystem, or save memory-held contents to the destination file. If the destination file already exists, it will be deleted first.

      If the target file has been moved in the filesystem, this operation cannot be invoked again afterwards. Therefore, call this method just once in order to work with any storage mechanism.

      NOTE: Depending on the underlying provider, temporary storage may be container-dependent, including the base directory for relative destinations specified here (e.g. with Servlet multipart handling). For absolute destinations, the target file may get renamed/moved from its temporary location or newly copied, even if a temporary copy already exists.

      指定者:
      transferTo 在接口中 MultipartFile
      参数:
      dest - the destination file (typically absolute)
      抛出:
      IOException - in case of reading or writing errors
      另请参阅:
    • saveInternal

      protected abstract void saveInternal(File dest) throws IOException
      抛出:
      IOException
    • getBytes

      public byte[] getBytes() throws IOException
      从接口复制的说明: MultipartFile
      Returns the contents of the file item as an array of bytes.
      指定者:
      getBytes 在接口中 MultipartFile
      抛出:
      IOException - If any IO exception occurred
    • doGetBytes

      protected abstract byte[] doGetBytes() throws IOException
      抛出:
      IOException
    • isFormField

      public boolean isFormField()
      从接口复制的说明: Multipart
      Determines whether or not a Multipart instance represents a simple form field.
      指定者:
      isFormField 在接口中 Multipart
      返回:
      true if the instance represents a simple form field; false if it represents an uploaded file.
    • getValue

      public String getValue()
      从接口复制的说明: Multipart
      Return the form field value.
      指定者:
      getValue 在接口中 Multipart