目录

HttpContent

Interface Info

public interface HttpContent extends StreamingContent

将HTTP请求内容序列化为输出流。

Public Method Summary

Qualifier and Type

Method Name and Description

void

writeTo(OutputStream out)

将内容写入输出流。

String

getType()

获取内容类型。

Public Methods

[h2]writeTo

Method

void writeTo(OutputStream out) throws IOException

将内容写入输出流。

Parameters

Name

Description

out

输出流。

Throws

Name

Description

java.io.IOException

若接口调用异常,会返回IOException。您可以通过getMessage()方法获取错误描述。

[h2]getType

Method

String getType()

获取内容类型。

Returns

Type

Description

String

返回内容类型。