public class FileRequestEntity extends java.lang.Object implements RequestEntity
| 构造器和说明 |
|---|
FileRequestEntity(java.io.File file,
java.lang.String contentType) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getContentLength()
Gets the request entity's length.
|
java.lang.String |
getContentType()
Gets the entity's content category.
|
boolean |
isRepeatable()
Tests if
RequestEntity.writeRequest(OutputStream) can be called more than once. |
void |
writeRequest(java.io.OutputStream out)
Writes the request entity to the given stream.
|
public long getContentLength()
RequestEntityEntityEnclosingMethod will use chunk encoding to
transmit the request entity.getContentLength 在接口中 RequestEntitypublic java.lang.String getContentType()
RequestEntitygetContentType 在接口中 RequestEntityHttpMethod.setRequestHeader(String, String)public boolean isRepeatable()
RequestEntityRequestEntity.writeRequest(OutputStream) can be called more than once.isRepeatable 在接口中 RequestEntityOutputStream more than once,
false otherwise.public void writeRequest(java.io.OutputStream out)
throws java.io.IOException
RequestEntitywriteRequest 在接口中 RequestEntityjava.io.IOException