类 MultipartFileResource

java.lang.Object
cn.taketoday.core.io.AbstractResource
cn.taketoday.web.multipart.MultipartFileResource
所有已实现的接口:
cn.taketoday.core.io.InputStreamSource, cn.taketoday.core.io.Resource

class MultipartFileResource extends cn.taketoday.core.io.AbstractResource
Adapt MultipartFile to Resource, exposing the content as InputStream and also overriding contentLength() as well as getName().
从以下版本开始:
4.0 2022/4/2 11:58
作者:
Rossen Stoyanchev, Harry Yang
另请参阅:
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private final MultipartFile
     

    从接口继承的字段 cn.taketoday.core.io.Resource

    EMPTY_ARRAY
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    long
     
    boolean
    equals(Object other)
     
    boolean
    This implementation always returns true.
    This implementation throws IllegalStateException if attempting to read the underlying stream multiple times.
     
    int
     
    boolean
    This implementation always returns true.
    This implementation returns a description that has the Multipart name.

    从类继承的方法 cn.taketoday.core.io.AbstractResource

    createRelative, customizeConnection, customizeConnection, getFile, getFileForLastModifiedCheck, getURI, getURL, isDirectory, isFile, isReadable, lastModified, list, list

    从类继承的方法 java.lang.Object

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

    从接口继承的方法 cn.taketoday.core.io.InputStreamSource

    getReader, getReader, readableChannel

    从接口继承的方法 cn.taketoday.core.io.Resource

    getContentAsByteArray, getContentAsString
  • 字段详细资料

  • 构造器详细资料

    • MultipartFileResource

      public MultipartFileResource(MultipartFile multipartFile)
  • 方法详细资料

    • exists

      public boolean exists()
      This implementation always returns true.
      指定者:
      exists 在接口中 cn.taketoday.core.io.Resource
      覆盖:
      exists 在类中 cn.taketoday.core.io.AbstractResource
    • isOpen

      public boolean isOpen()
      This implementation always returns true.
      指定者:
      isOpen 在接口中 cn.taketoday.core.io.Resource
      覆盖:
      isOpen 在类中 cn.taketoday.core.io.AbstractResource
    • contentLength

      public long contentLength()
      指定者:
      contentLength 在接口中 cn.taketoday.core.io.Resource
      覆盖:
      contentLength 在类中 cn.taketoday.core.io.AbstractResource
    • getName

      public String getName()
      指定者:
      getName 在接口中 cn.taketoday.core.io.Resource
      覆盖:
      getName 在类中 cn.taketoday.core.io.AbstractResource
    • getInputStream

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

      public String toString()
      This implementation returns a description that has the Multipart name.
      指定者:
      toString 在接口中 cn.taketoday.core.io.Resource
      覆盖:
      toString 在类中 cn.taketoday.core.io.AbstractResource
    • equals

      public boolean equals(@Nullable Object other)
      覆盖:
      equals 在类中 cn.taketoday.core.io.AbstractResource
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 cn.taketoday.core.io.AbstractResource