public class StringDataHandler extends Object implements DataHandler<String>
| 构造器和说明 |
|---|
StringDataHandler() |
| 限定符和类型 | 方法和说明 |
|---|---|
static StringDataHandler |
create()
返回字符串数据处理器
|
Charset |
getCharset()
获取字符编码
|
String |
handle(okhttp3.Response response)
得到相应结果后,将相应数据转为需要的数据格式
|
void |
setCharset(Charset charset)
设置字符编码
|
public static StringDataHandler create()
public Charset getCharset()
public void setCharset(Charset charset)
charset - 字符编码public String handle(okhttp3.Response response) throws IOException
handle 在接口中 DataHandler<String>response - 需要转换的对象IOException - 出现异常Copyright © 2017. All rights reserved.