org.apache.commons.httpclient.methods
Interface RequestEntity
- All Known Implementing Classes:
- InputStreamRequestEntity, ByteArrayRequestEntity, StringRequestEntity, MultipartRequestEntity
- public interface RequestEntity
- Since:
- 3.0
isRepeatable
public boolean isRepeatable()
- Tests if
writeRequest(OutputStream)
can be called more than once.
- Returns:
- true if the entity can be written to
OutputStream
more than once,
false otherwise.
writeRequest
public void writeRequest(OutputStream out)
throws IOException
- Writes the request entity to the given stream.
- Parameters:
out
- - Throws:
IOException
-
getContentLength
public long getContentLength()
- Gets the request entity's length. This method should return a non-negative value if the content
length is known or a negative value if it is not. In the latter case the
EntityEnclosingMethod
will use chunk encoding to
transmit the request entity.
- Returns:
- a non-negative value when content length is known or a negative value when content length
is not known
getContentType
public String getContentType()
- Gets the entity's content type. This content type will be used as the value for the
"Content-Type" header.
- Returns:
- the entity's content type
- See Also:
HttpMethod.setRequestHeader(String, String)
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.