|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.httpclient.methods.ByteArrayRequestEntity
public class ByteArrayRequestEntity
A RequestEntity that contains an array of bytes.
Constructor Summary | |
---|---|
ByteArrayRequestEntity(byte[] content)
Creates a new entity with the given content. |
|
ByteArrayRequestEntity(byte[] content,
String contentType)
Creates a new entity with the given content and content type. |
Method Summary | |
---|---|
byte[] |
getContent()
|
long |
getContentLength()
Gets the request entity's length. |
String |
getContentType()
Gets the entity's content type. |
boolean |
isRepeatable()
Tests if RequestEntity.writeRequest(OutputStream) can be called more than once. |
void |
writeRequest(OutputStream out)
Writes the request entity to the given stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteArrayRequestEntity(byte[] content)
content
- The content to set.public ByteArrayRequestEntity(byte[] content, String contentType)
content
- The content to set.contentType
- The content type to set or null
.Method Detail |
---|
public boolean isRepeatable()
RequestEntity
RequestEntity.writeRequest(OutputStream)
can be called more than once.
isRepeatable
in interface RequestEntity
true
public String getContentType()
getContentType
in interface RequestEntity
HttpMethod.setRequestHeader(String, String)
public void writeRequest(OutputStream out) throws IOException
writeRequest
in interface RequestEntity
IOException
public long getContentLength()
RequestEntity
EntityEnclosingMethod
will use chunk encoding to
transmit the request entity.
getContentLength
in interface RequestEntity
public byte[] getContent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |