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