RequestEntity
public class FileRequestEntity extends java.lang.Object implements RequestEntity
Constructor | Description |
---|---|
FileRequestEntity(java.io.File file,
java.lang.String contentType) |
Modifier and Type | Method | Description |
---|---|---|
long |
getContentLength() |
Gets the request entity's length.
|
java.lang.String |
getContentType() |
Gets the entity's content type.
|
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 FileRequestEntity(java.io.File file, java.lang.String contentType)
public long getContentLength()
RequestEntity
EntityEnclosingMethod
will use chunk encoding to
transmit the request entity.getContentLength
in interface RequestEntity
public java.lang.String getContentType()
RequestEntity
getContentType
in interface RequestEntity
HttpMethod.setRequestHeader(String, String)
public boolean isRepeatable()
RequestEntity
RequestEntity.writeRequest(OutputStream)
can be called more than once.isRepeatable
in interface RequestEntity
OutputStream
more than once,
false otherwise.public void writeRequest(java.io.OutputStream out) throws java.io.IOException
RequestEntity
writeRequest
in interface RequestEntity
java.io.IOException
Copyright (c) 1999-2005 - Apache Software Foundation