public class DownloadedFile extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
InputStream |
content
已过时。
1.11
|
String |
contentType
已过时。
1.11
|
String |
name
已过时。
1.11
|
| 构造器和说明 |
|---|
DownloadedFile() |
DownloadedFile(String contentType,
byte[] content,
String name) |
DownloadedFile(String contentType,
InputStream content,
String name)
基于下载输出的构建函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
getContent()
内容类型(有些地方会动态构建,所以不能只读)
|
String |
getContentType()
内容流
|
String |
getName()
文件名(带扩展名,例:demo.jpg)
|
void |
transferTo(File file)
将内容流迁移到..
|
void |
transferTo(OutputStream stream)
将内容流迁移到..
|
@Deprecated public String contentType
@Deprecated public InputStream content
@Deprecated public String name
public DownloadedFile()
public DownloadedFile(String contentType, InputStream content, String name)
contentType - 内容类型content - 内容流name - 文件名public InputStream getContent()
public String getContentType()
public String getName()
public void transferTo(File file) throws IOException
file - 文件IOExceptionpublic void transferTo(OutputStream stream) throws IOException
stream - 输出流IOExceptionCopyright © 2022. All rights reserved.