org.apache.commons.httpclient.methods
public class InputStreamRequestEntity extends Object implements RequestEntity
Since: 3.0
| Field Summary | |
|---|---|
| static int | CONTENT_LENGTH_AUTO
The content length will be calculated automatically. |
| Constructor Summary | |
|---|---|
| InputStreamRequestEntity(InputStream content)
Creates a new InputStreamRequestEntity with the given content and a content type of
CONTENT_LENGTH_AUTO. | |
| InputStreamRequestEntity(InputStream content, String contentType)
Creates a new InputStreamRequestEntity with the given content, content type, and a
content length of CONTENT_LENGTH_AUTO. | |
| InputStreamRequestEntity(InputStream content, long contentLength)
Creates a new InputStreamRequestEntity with the given content and content length. | |
| InputStreamRequestEntity(InputStream content, long contentLength, String contentType)
Creates a new InputStreamRequestEntity with the given content, content length, and
content type. | |
| Method Summary | |
|---|---|
| InputStream | getContent() |
| long | getContentLength()
Gets the content length. |
| String | getContentType() |
| boolean | isRepeatable()
Tests if this method is repeatable. |
| void | writeRequest(OutputStream out) |
Parameters: content The content to set.
Parameters: content The content to set. contentType The type of the content, or null.
Parameters: content The content to set. contentLength The content size in bytes or a negative number if not known. If CONTENT_LENGTH_AUTO is given the content will be buffered in order to determine its size when getContentLength is called.
Parameters: content The content to set. contentLength The content size in bytes or a negative number if not known.
If CONTENT_LENGTH_AUTO is given the content will be buffered in order to
determine its size when getContentLength is called. contentType The type of the content, or null.
Returns: Returns the content.
true if the content has been
buffered.
See Also: getContentLength