public class UploadedFile extends DownloadedFile
| 构造器和说明 |
|---|
UploadedFile() |
UploadedFile(String contentType,
InputStream content,
String name)
基于下载输出的构建函数
|
UploadedFile(String contentType,
long contentSize,
InputStream content,
String name,
String extension)
基于上传输入的构建函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getExtension()
扩展名(例:jpg)
|
boolean |
isEmpty()
是否为空
|
asAttachment, getContent, getContentSize, getContentType, getName, isAttachment, transferTo, transferTopublic UploadedFile()
public UploadedFile(String contentType, InputStream content, String name)
contentType - 内容类型content - 内容流name - 文件名public UploadedFile(String contentType, long contentSize, InputStream content, String name, String extension)
contentType - 内容类型contentSize - 内容大小content - 内容流name - 文件名extension - 文件后缀名public String getExtension()
public boolean isEmpty()
throws IOException
IOExceptionCopyright © 2024. All rights reserved.