public interface BytesXMLMessage extends XMLMessage
BytesXMLMessage
describes a message that is sent or received.XMLMessage.MessageUserPropertyConstants, XMLMessage.Outcome
MSGDUMP_BRIEF, MSGDUMP_FULL
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Gets a byte array with the message content of the XML part.
|
int |
readBytes(byte[] value)
Deprecated.
As of release 4.5, use
XMLMessage.readContentBytes(int, byte[], int, int) .
This function used a read pointer stored in the message and
therefore was not thread-safe when called by consumers of the
message. |
int |
readBytes(byte[] value,
int length)
Deprecated.
As of release 4.5, use
XMLMessage.readContentBytes(int, byte[], int, int) .
This function used a read pointer stored in the message and
therefore was not thread-safe when called by consumers of the
message. |
void |
rewindContent()
Deprecated.
As of release 4.5, use
XMLMessage.readContentBytes(int, byte[], int, int) .
This function used a read pointer stored in the message and
therefore was not thread-safe when called by consumers of the
message. |
void |
writeBytes(byte[] value)
Writes a byte array to the message content of the XML part, appending to existing content
if present.
|
void |
writeBytes(byte[] value,
int offset,
int length)
Writes a partial byte array to the message content of the XML part, appending to existing
content if present.
|
ackMessage, clearAttachment, clearContent, dump, dump, getApplicationMessageId, getApplicationMessageType, getAppMessageID, getAppMessageType, getAttachmentByteBuffer, getAttachmentContentLength, getCacheRequestId, getConsumerIdList, getContentLength, getCorrelationId, getCorrelationKey, getCos, getDeliverToOne, getDeliveryCount, getDeliveryMode, getDestination, getDestinationTopicSuffix, getDiscardIndication, getExpiration, getHTTPContentEncoding, getHTTPContentType, getMessageId, getMessageIdLong, getMessageType, getPriority, getProperties, getReceiveTimestamp, getRedelivered, getReplicationGroupMessageId, getReplyTo, getReplyToSuffix, getSenderId, getSenderID, getSenderTimestamp, getSendTimestamp, getSequenceNumber, getTimeToLive, getTopicSequenceNumber, getUserData, hasAttachment, hasContent, hasUserData, isAckImmediately, isCacheMessage, isDMQEligible, isElidingEligible, isReadOnly, isReplyMessage, isSuspect, readAttachmentBytes, readAttachmentBytes, readAttachmentBytes, readContentBytes, readContentBytes, readContentBytes, rejectMessage, reset, rewindAttachment, setAckImmediately, setApplicationMessageId, setApplicationMessageType, setAppMessageID, setAppMessageType, setAsReplyMessage, setCorrelationId, setCorrelationKey, setCos, setDeliverToOne, setDeliveryMode, setDMQEligible, setElidingEligible, setExpiration, setHTTPContentEncoding, setHTTPContentType, setMessageType, setPriority, setProperties, setReadOnly, setReplyTo, setReplyToSuffix, setSenderId, setSenderID, setSenderTimestamp, setSendTimestamp, setSequenceNumber, setTimeToLive, settle, setUserData, writeAttachment, writeAttachment, writeAttachment, writeNewAttachment, writeNewAttachment, writeNewAttachment, writeNewAttachment
@Deprecated int readBytes(byte[] value)
XMLMessage.readContentBytes(int, byte[], int, int)
.
This function used a read pointer stored in the message and
therefore was not thread-safe when called by consumers of the
message.
If the length of array value
is less than the number of
bytes remaining to be read from the message content, the array is filled.
The read mark for the message content is incremented by the number of
bytes read. A subsequent call reads from the read mark, and so on.
If the number of bytes remaining in the message content is less than the
length of array value
, the bytes are read into the array.
The read mark for the message content is incremented by the number of
bytes read. The return value of the total number of bytes read is less
than the length of the array, which indicates that there are no more
bytes left to be read from the message content. The next read would then
return -1
.
value
- The buffer into which the data is read.@Deprecated int readBytes(byte[] value, int length)
XMLMessage.readContentBytes(int, byte[], int, int)
.
This function used a read pointer stored in the message and
therefore was not thread-safe when called by consumers of the
message.length
bytes from the message content, and copies the
data read to the supplied byte array.
If length
is less than the number of bytes remaining to be
read from the message content, length
bytes are read. The
read mark for the message content is incremented by the number of bytes
read. A subsequent call reads from the read mark, and so on.
If the number of bytes remaining to be read in the message content is
less than length
, the remaining bytes are read into the
array. The read mark for the message content is incremented by the number
of bytes read. The return value of the total number of bytes read is less
than length
, which indicates that there are no more bytes
left to be read from the message content. The next read of the message
returns -1
.
If length
is greater than the length of the array
value
, an IndexOutOfBoundsException
is thrown.
No bytes are read from the message content for this exception case.
value
- The buffer into which the data is read.length
- The number of bytes to read; this must be less than or equal to
value.length
.@Deprecated void rewindContent()
XMLMessage.readContentBytes(int, byte[], int, int)
.
This function used a read pointer stored in the message and
therefore was not thread-safe when called by consumers of the
message.BytesXMLMessage.readBytes(byte[])
or BytesXMLMessage.readBytes(byte[], int)
reads from
the beginning of the message content.void writeBytes(byte[] value)
An application that wants to replace content, for example when publishing
the same message again with different content, can call
XMLMessage.clearContent()
, then write the new data.
This method copies the input bytes into the message.
value
- The byte array to be written (by appending to existing data).void writeBytes(byte[] value, int offset, int length)
An application that wants to replace content, for example when publishing
the same message again with different content, can call
XMLMessage.clearContent()
, then write the new data.
This method copies the input bytes into the message.
value
- The byte array to be written.offset
- The initial offset within the byte array.length
- The number of bytes to use.byte[] getBytes()
The message content is returned when the message is read-only. Otherwise, the method returns an empty byte array.
Note that there is no guarantee that the array will have the same length
as the content; it may in fact be larger. Applications should only read
the number of bytes returned by XMLMessage.getContentLength()
.
Copyright 2004-2024 Solace Corporation. All rights reserved.