public class ByteArrayContent
extends ByteArrayContent
Implementation of the class OutgoingContent.ByteArrayContent
for sending array of bytes
class OutgoingContent.ByteArrayContent
OutgoingContent.ByteArrayContent, OutgoingContent.NoContent, OutgoingContent.ProtocolUpgrade, OutgoingContent.ReadChannelContent, OutgoingContent.WriteChannelContent
Constructor and Description |
---|
ByteArrayContent(byte[] bytes,
ContentType contentType,
HttpStatusCode status)
Implementation of the
class OutgoingContent.ByteArrayContent for sending array of bytes |
Modifier and Type | Method and Description |
---|---|
byte[] |
bytes()
Provides ByteArray which engine will send to peer
|
java.lang.Long |
getContentLength()
Specifies content length in bytes for this resource.
|
ContentType |
getContentType()
Specifies
|
HttpStatusCode |
getStatus()
Status code to set when sending this content
|
bytes
getContentLength, getContentType, getHeaders, getProperty, getStatus, setProperty
public ByteArrayContent(byte[] bytes, ContentType contentType, HttpStatusCode status)
Implementation of the class OutgoingContent.ByteArrayContent
for sending array of bytes
contentType
- Specifies class ContentType
for this resource.status
- Status code to set when sending this contentclass OutgoingContent.ByteArrayContent
public java.lang.Long getContentLength()
Specifies content length in bytes for this resource.
If null, the resources will be sent as Transfer-Encoding: chunked
public ContentType getContentType()
Specifies
class ContentType
for this resource.
class ContentType
public HttpStatusCode getStatus()
Status code to set when sending this content