public class FileDataHandler extends Object implements DataHandler<File>
| 构造器和说明 |
|---|
FileDataHandler(String dirPath) |
FileDataHandler(String dirPath,
String filename) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getDirPath()
返回保存的文件目录
|
String |
getFilename()
返回保存的文件名
|
File |
handle(okhttp3.Response response)
得到相应结果后,将相应数据转为需要的数据格式
|
void |
setFilename(String filename)
设置保存的文件名
|
public FileDataHandler(String dirPath)
public String getDirPath()
public String getFilename()
public void setFilename(String filename)
filename - 保存的文件名public File handle(okhttp3.Response response) throws IOException
handle 在接口中 DataHandler<File>response - 需要转换的对象IOException - 出现异常Copyright © 2017. All rights reserved.