public class RMQBytesMessage extends RMQMessage implements javax.jms.BytesMessage
BytesMessage interface.DEFAULT_MESSAGE_BODY_SIZE, logger, MSG_EOF, NOT_READABLE, NOT_WRITEABLE, UNABLE_TO_CAST| Constructor and Description |
|---|
RMQBytesMessage()
Instantiates a new, writable RMQBytesMessage
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearBodyInternal() |
protected <T> T |
doGetBody(java.lang.Class<T> c) |
long |
getBodyLength() |
boolean |
isBodyAssignableTo(java.lang.Class c) |
protected void |
readAmqpBody(byte[] barr)
Invoked when an AMQP message is being transformed into a RMQMessage
The implementing class should only read its body by this method
|
protected void |
readBody(java.io.ObjectInput inputStream,
java.io.ByteArrayInputStream bin)
Invoked when a message is being deserialized to read and decode the message body.
|
boolean |
readBoolean() |
byte |
readByte() |
int |
readBytes(byte[] value) |
int |
readBytes(byte[] value,
int length) |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
java.lang.String |
readUTF() |
static RMQMessage |
recreate(javax.jms.BytesMessage msg) |
void |
reset() |
protected void |
writeAmqpBody(java.io.ByteArrayOutputStream baos)
Invoked when
RMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. |
protected void |
writeBody(java.io.ObjectOutput oOut,
java.io.ByteArrayOutputStream bout)
Invoked when
RMQMessage.toByteArray() is called to create
a byte[] from a message. |
void |
writeBoolean(boolean value) |
void |
writeByte(byte value) |
void |
writeBytes(byte[] value) |
void |
writeBytes(byte[] value,
int offset,
int length) |
void |
writeChar(char value) |
void |
writeDouble(double value) |
void |
writeFloat(float value) |
void |
writeInt(int value) |
void |
writeLong(long value) |
void |
writeObject(java.lang.Object value) |
void |
writeShort(short value) |
void |
writeUTF(java.lang.String value) |
acknowledge, clearBody, clearProperties, clone, copyAttributes, doNotDeclareReplyToDestination, equals, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getInternalID, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getRabbitDeliveryTag, getSession, getShortProperty, getStringProperty, hashCode, isReadonlyBody, isReadOnlyProperties, loggerDebugByteArray, propertyExists, readPrimitive, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setRabbitDeliveryTag, setReadonly, setReadOnlyBody, setReadOnlyProperties, setSession, setShortProperty, setStringProperty, writePrimitive, writePrimitivefinalize, getClass, notify, notifyAll, toString, wait, wait, waitacknowledge, clearBody, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringPropertypublic RMQBytesMessage()
public boolean readBoolean()
throws javax.jms.JMSException
readBoolean in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic byte readByte()
throws javax.jms.JMSException
readByte in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic int readUnsignedByte()
throws javax.jms.JMSException
readUnsignedByte in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic short readShort()
throws javax.jms.JMSException
readShort in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic int readUnsignedShort()
throws javax.jms.JMSException
readUnsignedShort in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic char readChar()
throws javax.jms.JMSException
readChar in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic int readInt()
throws javax.jms.JMSException
readInt in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic long readLong()
throws javax.jms.JMSException
readLong in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic float readFloat()
throws javax.jms.JMSException
readFloat in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic double readDouble()
throws javax.jms.JMSException
readDouble in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic java.lang.String readUTF()
throws javax.jms.JMSException
readUTF in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic int readBytes(byte[] value)
throws javax.jms.JMSException
readBytes in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic int readBytes(byte[] value,
int length)
throws javax.jms.JMSException
readBytes in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeBoolean(boolean value)
throws javax.jms.JMSException
writeBoolean in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeByte(byte value)
throws javax.jms.JMSException
writeByte in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeShort(short value)
throws javax.jms.JMSException
writeShort in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeChar(char value)
throws javax.jms.JMSException
writeChar in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeInt(int value)
throws javax.jms.JMSException
writeInt in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeLong(long value)
throws javax.jms.JMSException
writeLong in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeFloat(float value)
throws javax.jms.JMSException
writeFloat in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeDouble(double value)
throws javax.jms.JMSException
writeDouble in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeUTF(java.lang.String value)
throws javax.jms.JMSException
writeUTF in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeBytes(byte[] value)
throws javax.jms.JMSException
writeBytes in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeBytes(byte[] value,
int offset,
int length)
throws javax.jms.JMSException
writeBytes in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void writeObject(java.lang.Object value)
throws javax.jms.JMSException
writeObject in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void reset()
throws javax.jms.JMSException
reset in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic long getBodyLength()
throws javax.jms.JMSException
getBodyLength in interface javax.jms.BytesMessagejavax.jms.JMSExceptionpublic void clearBodyInternal()
throws javax.jms.JMSException
clearBodyInternal in class RMQMessagejavax.jms.JMSExceptionprotected void writeBody(java.io.ObjectOutput oOut,
java.io.ByteArrayOutputStream bout)
throws java.io.IOException
RMQMessage.toByteArray() is called to create
a byte[] from a message. Each subclass must implement this, but ONLY
write its specific body. All the properties defined in Message
will be written by the parent class.writeBody in class RMQMessageoOut - - the output stream to which the structured part of message body (scalar types) is writtenbout - - the output stream to which the un-structured part of message body (explicit bytes) is writtenjava.io.IOException - if the body can not be writtenprotected void writeAmqpBody(java.io.ByteArrayOutputStream baos)
throws java.io.IOException
RMQMessageRMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. Each subclass must implement this, but ONLY
write its specific body.writeAmqpBody in class RMQMessagebaos - - the output stream to which the message body is writtenjava.io.IOException - if the body can not be writtenprotected void readBody(java.io.ObjectInput inputStream,
java.io.ByteArrayInputStream bin)
throws java.io.IOException,
java.lang.ClassNotFoundException
RMQBytesMessage,
only a byte array remains.readBody in class RMQMessageinputStream - - the stream to read its body frombin - - the underlying byte input streamjava.io.IOException - if a read error occurs on the input streamjava.lang.ClassNotFoundException - if the object class cannot be foundprotected void readAmqpBody(byte[] barr)
RMQMessagereadAmqpBody in class RMQMessagebarr - - the byte array payload of the AMQP messagepublic static RMQMessage recreate(javax.jms.BytesMessage msg) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic boolean isBodyAssignableTo(java.lang.Class c)
isBodyAssignableTo in interface javax.jms.Messageprotected <T> T doGetBody(java.lang.Class<T> c)
throws javax.jms.JMSException
doGetBody in class RMQMessagejavax.jms.JMSExceptionCopyright © 2022. All rights reserved.