|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jms.AQjmsMessage | +--oracle.jms.AQjmsBytesMessage
Oracle class implementing javax.jms.BytesMessage
Field Summary |
Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Method Summary | |
void |
clearBody() Clears out the message body. |
void |
clearProperties() Clears a message's properties. |
protected void |
closeContainer() |
long |
getBodyLength() Gets the number of bytes of the message body when the message is in read-only mode. |
protected oracle.sql.ORAData |
getMessageCont() |
protected void |
populateMessageContainer(oracle.jdbc.OracleConnection db_conn, boolean usetemplob) |
boolean |
readBoolean() Read a boolean from the stream message. |
byte |
readByte() Read a signed 8-bit value from the stream message. |
int |
readBytes(byte[] value) Read a byte array from the stream message. |
int |
readBytes(byte[] value, int length) Read a portion of the bytes message. |
char |
readChar() Read a Unicode character value from the stream message. |
double |
readDouble() Read a double from the stream message. |
float |
readFloat() Read a float from the stream message. |
int |
readInt() Read a signed 32-bit integer from the stream message. |
long |
readLong() Read a signed 64-bit integer from the stream message. |
short |
readShort() Reads a signed 16-bit number from the bytes message stream. |
int |
readUnsignedByte() Read an unsigned 8-bit number from the stream message. |
int |
readUnsignedShort() Read an unsigned 16-bit number from the stream message. |
java.lang.String |
readUTF() Read in a string that has been encoded using a modified UTF-8 format from the stream message. |
void |
reset() Put the message in read-only mode, and reposition the stream of bytes to the beginning. |
protected void |
write_lob(java.sql.Connection db_conn, java.lang.String q_table, byte[] msg_id, boolean gen_pload, boolean is_anydata_dest) |
void |
writeBoolean(boolean value) Write a boolean to the stream message as a 1-byte value. |
void |
writeByte(byte value) Write out a byte to the stream message as a 1-byte value. |
void |
writeBytes(byte[] value) Write a byte array to the stream message. |
void |
writeBytes(byte[] value, int offset, int length) Write a portion of a byte array to the stream message. |
void |
writeChar(char value) Write a char to the stream message as a 2-byte value, high byte first. |
void |
writeDouble(double value) Convert the double argument to a long using the doubleToLongBits method in class Double , and then writes that long value to the stream message as an 8-byte quantity, high byte first. |
void |
writeFloat(float value) Convert the float argument to an int using the floatToIntBits method in class Float , and then writes that int value to the stream message as a 4-byte quantity, high byte first. |
void |
writeInt(int value) Write an int to the stream message as four bytes, high byte first. |
void |
writeLong(long value) Write a long to the stream message as eight bytes, high byte first. |
void |
writeObject(java.lang.Object value) Write a Java object to the stream message. |
void |
writeShort(short value) Write a short to the stream message as two bytes, high byte first. |
void |
writeUTF(java.lang.String value) Write a string to the stream message using UTF-8 encoding in a machine-independent manner. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void clearBody() throws JMSException
Message
If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.
clearBody
in interface Message
clearBody
in class AQjmsMessage
JMSException
- if the JMS provider fails to clear the message body due to some internal error.public void clearProperties() throws JMSException
Message
The message's header fields and body are not cleared.
clearProperties
in interface Message
clearProperties
in class AQjmsMessage
JMSException
- if the JMS provider fails to clear the message properties due to some internal error.public boolean readBoolean() throws JMSException
boolean
from the stream message.readBoolean
in interface BytesMessage
boolean
value read.MessageNotReadableException
- if message in write-only mode.JMSException
- if JMS fails to read message due to some internal JMS error.MessageEOFException
- if end of message streampublic byte readByte() throws JMSException
readByte
in interface BytesMessage
byte
.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public int readUnsignedByte() throws JMSException
readUnsignedByte
in interface BytesMessage
MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public short readShort() throws JMSException
BytesMessage
readShort
in interface BytesMessage
JMSException
- if the JMS provider fails to read the message due to some internal error.public int readUnsignedShort() throws JMSException
readUnsignedShort
in interface BytesMessage
MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public char readChar() throws JMSException
readChar
in interface BytesMessage
MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public int readInt() throws JMSException
readInt
in interface BytesMessage
int
.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public long readLong() throws JMSException
readLong
in interface BytesMessage
long
.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public float readFloat() throws JMSException
readFloat
in interface BytesMessage
float
.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public double readDouble() throws JMSException
double
from the stream message.readDouble
in interface BytesMessage
double
.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public java.lang.String readUTF() throws JMSException
readUTF
in interface BytesMessage
MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public int readBytes(byte[] value) throws JMSException
readBytes
in interface BytesMessage
value
- the buffer into which the data is read.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public int readBytes(byte[] value, int length) throws JMSException
readBytes
in interface BytesMessage
value
- the buffer into which the data is read.length
- the number of bytes to read.MessageNotReadableException
- if message in write-only mode.MessageEOFException
- if end of message streamJMSException
- if JMS fails to read message due to some internal JMS error.public void writeBoolean(boolean value) throws JMSException
boolean
to the stream message as a 1-byte value. The value true
is written out as the value (byte)1
; the value false
is written out as the value (byte)0
.writeBoolean
in interface BytesMessage
value
- the boolean value to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeByte(byte value) throws JMSException
byte
to the stream message as a 1-byte value.writeByte
in interface BytesMessage
value
- the byte
value to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeShort(short value) throws JMSException
short
to the stream message as two bytes, high byte first.writeShort
in interface BytesMessage
value
- the short
to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeChar(char value) throws JMSException
char
to the stream message as a 2-byte value, high byte first.writeChar
in interface BytesMessage
value
- the char
value to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeInt(int value) throws JMSException
int
to the stream message as four bytes, high byte first.writeInt
in interface BytesMessage
value
- the int
to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeLong(long value) throws JMSException
long
to the stream message as eight bytes, high byte first.writeLong
in interface BytesMessage
value
- the long
to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeFloat(float value) throws JMSException
int
using the floatToIntBits
method in class Float
, and then writes that int
value to the stream message as a 4-byte quantity, high byte first.writeFloat
in interface BytesMessage
value
- the float
value to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeDouble(double value) throws JMSException
long
using the doubleToLongBits
method in class Double
, and then writes that long
value to the stream message as an 8-byte quantity, high byte first.writeDouble
in interface BytesMessage
value
- the double
value to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeUTF(java.lang.String value) throws JMSException
writeUTF
in interface BytesMessage
value
- the String
value to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeBytes(byte[] value) throws JMSException
writeBytes
in interface BytesMessage
value
- the byte array to be written.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeBytes(byte[] value, int offset, int length) throws JMSException
writeBytes
in interface BytesMessage
value
- the byte array value to be written.offset
- the initial offset within the byte array.length
- the number of bytes to use.MessageNotWriteableException
- if message in read-only mode.JMSException
- if JMS fails to write message due to some internal JMS error.public void writeObject(java.lang.Object value) throws JMSException
Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and byte arrays.
writeObject
in interface BytesMessage
value
- the Java object to be written.MessageNotWriteableException
- if message in read-only mode.MessageFormatException
- if object is invalid type.JMSException
- if JMS fails to write message due to some internal JMS error.public void reset() throws JMSException
reset
in interface BytesMessage
JMSException
- if JMS fails to reset the message due to some internal JMS error.MessageFormatException
- if message has an invalid formatprotected oracle.sql.ORAData getMessageCont()
getMessageCont
in class AQjmsMessage
protected void closeContainer()
closeContainer
in class AQjmsMessage
protected void populateMessageContainer(oracle.jdbc.OracleConnection db_conn, boolean usetemplob) throws JMSException, java.sql.SQLException
populateMessageContainer
in class AQjmsMessage
JMSException
java.sql.SQLException
protected void write_lob(java.sql.Connection db_conn, java.lang.String q_table, byte[] msg_id, boolean gen_pload, boolean is_anydata_dest) throws JMSException
write_lob
in class AQjmsMessage
JMSException
public long getBodyLength() throws JMSException
getBodyLength
in interface BytesMessage
JMSException
- if the JMS provider fails to read the message due to some internal error.MessageNotReadableException
- if the message is in write-only mode.
|
Oracle® Streams Advanced Queuing Java API Reference Release 1 (10.1) B12023-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |