public class ByteArrayRequestEntity extends Object implements RequestEntity
| 构造器和说明 |
|---|
ByteArrayRequestEntity(byte[] content)
Creates a new entity with the given content.
|
ByteArrayRequestEntity(byte[] content,
String contentType)
Creates a new entity with the given content and content type.
|
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
getContent() |
long |
getContentLength()
Gets the request entity's length.
|
String |
getContentType()
Gets the entity's content type.
|
boolean |
isRepeatable()
Tests if
RequestEntity.writeRequest(OutputStream) can be called more than once. |
void |
writeRequest(OutputStream out)
Writes the request entity to the given stream.
|
public ByteArrayRequestEntity(byte[] content)
content - The content to set.public ByteArrayRequestEntity(byte[] content,
String contentType)
content - The content to set.contentType - The content type to set or null.public boolean isRepeatable()
RequestEntityRequestEntity.writeRequest(OutputStream) can be called more than once.isRepeatable 在接口中 RequestEntitytruepublic String getContentType()
RequestEntitygetContentType 在接口中 RequestEntitycom.ptteng.mall.order.util.apacheCommonUtil.httpclient.HttpMethod#setRequestHeader(String, String)public void writeRequest(OutputStream out) throws IOException
RequestEntitywriteRequest 在接口中 RequestEntityIOExceptionpublic long getContentLength()
RequestEntitycom.ptteng.mall.order.util.apacheCommonUtil.httpclient.methods.EntityEnclosingMethod will use chunk encoding to
transmit the request entity.getContentLength 在接口中 RequestEntitypublic byte[] getContent()
Copyright © 2017. All rights reserved.