org.apache.commons.httpclient.methods
Class ByteArrayRequestEntity
- RequestEntity
public class ByteArrayRequestEntity
A RequestEntity that contains an array of bytes.
- 3.0
ByteArrayRequestEntity
public ByteArrayRequestEntity(byte[] content)
Creates a new entity with the given content.
content - The content to set.
ByteArrayRequestEntity
public ByteArrayRequestEntity(byte[] content,
String contentType) Creates a new entity with the given content and content type.
content - The content to set.contentType - The content type to set or null.
getContent
public byte[] getContent()
- Returns the content.
writeRequest
public void writeRequest(OutputStream out)
throws IOException Writes the request entity to the given stream.
- writeRequest in interface RequestEntity
out -
Copyright (c) 1999-2005 - Apache Software Foundation