类 FileItem


  • public class FileItem
    extends java.lang.Object
    文件元数据。
    版本:
    $Id: $Id
    作者:
    modificial
    • 构造器概要

      构造器 
      构造器 说明
      FileItem​(java.io.File file)
      基于本地文件的构造器。
      FileItem​(java.lang.String filePath)
      基于文件绝对路径的构造器。
      FileItem​(java.lang.String fileName, byte[] content)
      基于文件名和字节流的构造器。
      FileItem​(java.lang.String fileName, byte[] content, java.lang.String mimeType)
      基于文件名、字节流和媒体类型的构造器。
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      byte[] getContent()
      Getter for the field content.
      java.lang.String getFileName()
      Getter for the field fileName.
      java.lang.String getMimeType()
      Getter for the field mimeType.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • FileItem

        public FileItem​(java.io.File file)
        基于本地文件的构造器。
        参数:
        file - 本地文件
      • FileItem

        public FileItem​(java.lang.String filePath)
        基于文件绝对路径的构造器。
        参数:
        filePath - 文件绝对路径
      • FileItem

        public FileItem​(java.lang.String fileName,
                        byte[] content)
        基于文件名和字节流的构造器。
        参数:
        fileName - 文件名
        content - 文件字节流
      • FileItem

        public FileItem​(java.lang.String fileName,
                        byte[] content,
                        java.lang.String mimeType)
        基于文件名、字节流和媒体类型的构造器。
        参数:
        fileName - 文件名
        content - 文件字节流
        mimeType - 媒体类型
    • 方法详细资料

      • getFileName

        public java.lang.String getFileName()

        Getter for the field fileName.

        返回:
        a String object.
      • getMimeType

        public java.lang.String getMimeType()
                                     throws java.io.IOException

        Getter for the field mimeType.

        返回:
        a String object.
        抛出:
        java.io.IOException - if any.
      • getContent

        public byte[] getContent()
                          throws java.io.IOException

        Getter for the field content.

        返回:
        an array of byte objects.
        抛出:
        java.io.IOException - if any.