|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.commons.httpclient.methods.InputStreamRequestEntity
A RequestEntity that contains an InputStream.
| 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,
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. |
|
InputStreamRequestEntity(InputStream content,
String contentType)
Creates a new InputStreamRequestEntity with the given content, content type, and a content length of CONTENT_LENGTH_AUTO. |
|
| Method Summary | |
InputStream |
getContent()
|
long |
getContentLength()
Gets the content length. |
String |
getContentType()
Gets the entity's content type. |
boolean |
isRepeatable()
Tests if this method is repeatable. |
void |
writeRequest(OutputStream out)
Writes the request entity to the given stream. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int CONTENT_LENGTH_AUTO
| Constructor Detail |
public InputStreamRequestEntity(InputStream content)
CONTENT_LENGTH_AUTO.content - The content to set.
public InputStreamRequestEntity(InputStream content,
String contentType)
CONTENT_LENGTH_AUTO.content - The content to set.contentType - The type of the content, or null.
public InputStreamRequestEntity(InputStream content,
long contentLength)
content - The content to set.contentLength - The content size in bytes or any of
CONTENT_LENGTH_AUTO,
CONTENT_LENGTH_CHUNKED. If the number
of bytes or CONTENT_LENGTH_CHUNKED is specified the content will not be
buffered when getContentLength() is called.
public InputStreamRequestEntity(InputStream content,
long contentLength,
String contentType)
content - The content to set.contentLength - The content size in bytes or any of
CONTENT_LENGTH_AUTO,
CONTENT_LENGTH_CHUNKED. If the number
of bytes or CONTENT_LENGTH_CHUNKED is specified the content will not be
buffered when getContentLength() is called.contentType - The type of the content, or null.| Method Detail |
public String getContentType()
RequestEntitygetContentType in interface RequestEntityorg.apache.commons.httpclient.methods.RequestEntityHttpMethod.setRequestHeader(String, String)public boolean isRepeatable()
true if the content has been
buffered.isRepeatable in interface RequestEntitygetContentLength()
public void writeRequest(OutputStream out)
throws IOException
RequestEntitywriteRequest in interface RequestEntityorg.apache.commons.httpclient.methods.RequestEntityout - IOException - public long getContentLength()
getContentLength in interface RequestEntityorg.apache.commons.httpclient.methods.RequestEntityEntityEnclosingMethod.CONTENT_LENGTH_CHUNKEDpublic InputStream getContent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||