public static class XRequest.StringContent extends Object implements XHttpExecutor.Content
| 构造器和说明 |
|---|
StringContent(String mime,
String str) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
charset() |
long |
contentLength()
请求体的长度,如果不确定长度可以返回-1,这将使用chunked模式传输
|
String |
contentType()
请求体的MIME类型
|
void |
contentWrite(OutputStream outStream)
请求体写出到输出流的具体方法
|
public final String charset
public final String mime
public final byte[] bytes
public String charset()
public String contentType()
XHttpExecutor.ContentcontentType 在接口中 XHttpExecutor.Contentpublic long contentLength()
XHttpExecutor.ContentcontentLength 在接口中 XHttpExecutor.Contentpublic void contentWrite(OutputStream outStream) throws IOException
XHttpExecutor.ContentcontentWrite 在接口中 XHttpExecutor.ContentoutStream - 目标输出流IOException - 将请求体写出到输出流时可能会发生异常Copyright © 2019. All rights reserved.