类 FileItem
- java.lang.Object
-
- com.github.aiosign.base.FileItem
-
public class FileItem extends java.lang.Object文件元数据。- 版本:
- $Id: $Id
- 作者:
- modificial
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 byte[]getContent()Getter for the fieldcontent.java.lang.StringgetFileName()Getter for the fieldfileName.java.lang.StringgetMimeType()Getter for the fieldmimeType.
-
-
-
构造器详细资料
-
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
Stringobject.
-
getMimeType
public java.lang.String getMimeType() throws java.io.IOExceptionGetter for the field
mimeType.- 返回:
- a
Stringobject. - 抛出:
java.io.IOException- if any.
-
getContent
public byte[] getContent() throws java.io.IOExceptionGetter for the field
content.- 返回:
- an array of
byteobjects. - 抛出:
java.io.IOException- if any.
-
-