public class FileItem extends Object
Constructor and Description |
---|
FileItem(File file)
基于本地文件的构造器。
|
FileItem(String filePath)
基于文件绝对路径的构造器。
|
FileItem(String fileName,
byte[] content)
基于文件名和字节流的构造器。
|
FileItem(String fileName,
byte[] content,
String mimeType)
基于文件名、字节流和媒体类型的构造器。
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent()
Get content byte [ ].
|
String |
getFileName()
Gets file name.
|
String |
getMimeType()
Gets mime type.
|
public FileItem(File file)
file
- 本地文件public FileItem(String filePath)
filePath
- 文件绝对路径public FileItem(String fileName, byte[] content)
fileName
- 文件名content
- 文件字节流public String getFileName()
public String getMimeType() throws IOException
IOException
- the io exceptionpublic byte[] getContent() throws IOException
IOException
- the io exceptionCopyright © 2018. All rights reserved.