public class HttpBinaryBodyContent
Represents the body content of a HTTP message (request/response) that contains binary data.
| Constructor and description |
|---|
HttpBinaryBodyContent
(byte[] binaryData)Creates an instance with the given binary data and default content type. |
HttpBinaryBodyContent
(byte[] binaryData, String contentType)Creates an instance with the given binary data and content type. |
HttpBinaryBodyContent
(byte[] binaryData, String contentType, String contentEncoding)Creates an instance with the given binary data, content type, and content encoding. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public byte[] |
getBinaryData()Gets the binary data. |
|
public String |
getContentEncoding() |
|
public long |
getContentLength() |
|
public String |
getContentType() |
|
public InputStream |
getInputStream() |
|
public void |
writeTo(OutputStream outstream) |
Creates an instance with the given binary data and default content type.
binaryData - The raw binary content.Creates an instance with the given binary data and content type.
binaryData - The raw binary content.contentType - The content type to be used. If null or empty, the default content type is used.Creates an instance with the given binary data, content type, and content encoding.
binaryData - The raw binary content.contentType - The content type to be used. If null or empty, the default content type is used.contentEncoding - The content encoding to be used.Gets the binary data.