com.ibm.mq
Class MQMessage
- java.lang.Object
com.ibm.mq.jmqi.JmqiObject
com.ibm.mq.MQMD
com.ibm.mq.MQMessage
- public class MQMessage
- extends MQMD
- implements java.io.DataInput, java.io.DataOutput
encodingand characterSet
fields. The remaining fields contain control information that accompanies the application message
data when a message travels between sending and receiving applications.
Field Summary
| Fields inherited from class com.ibm.mq.MQMD |
|---|
accountingToken, applicationIdData, applicationOriginData, backoutCount, characterSet, correlationId, encoding, expiry, feedback, format, groupId, messageFlags, messageId, messageSequenceNumber, messageType, offset, originalLength, persistence, priority, putApplicationName, putApplicationType, putDateTime, replyToQueueManagerName, replyToQueueName, report, userId |
| Fields inherited from class com.ibm.mq.jmqi.JmqiObject |
|---|
COMP_JM, COMP_JN, COMP_JO |
Constructor Summary
| Constructor and Description |
|---|
MQMessage()
The default constructor.
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
clearMessage()
Discards any data in the message buffer and sets the cursor position to zero.
|
|
deleteProperty(java.lang.String nameP)
Deletes a property with the specified name from the message.
|
|
getBooleanProperty(java.lang.String name)
Returns the value of the boolean property with the specified name.
|
|
getBooleanProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the boolean property with the specified name, filling in the specified
property descriptor.
|
|
getByteProperty(java.lang.String name)
Returns the value of the byte property with the specified name.
|
|
getByteProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the byte property with the specified name, filling in the specified
property descriptor.
|
|
getBytesProperty(java.lang.String name)
Returns the value of the byte array property with the specified name.
|
|
getBytesProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the byte array property with the specified name, filling in the specified
property descriptor.
|
|
getDataLength()
Gets the number of bytes of message data remaining to be read.
|
|
getDataOffset()
Returns the current cursor position within the message data (the point at which read and write
operations take effect).
|
|
getDoubleProperty(java.lang.String name)
Returns the value of the double property with the specified name.
|
|
getDoubleProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the double property with the specified name, filling in the specified
property descriptor.
|
|
getFloatProperty(java.lang.String name)
Returns the value of the float property with the specified name.
|
|
getFloatProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the float property with the specified name, filling in the specified
property descriptor.
|
|
getInt2Property(java.lang.String name)
Synonym for
getShortProperty(String), provided for cross-language WebSphere MQ API
compatibility.
|
|
getInt2Property(java.lang.String name,MQPropertyDescriptor descriptor)
Synonym for
getShortProperty(String, MQPropertyDescriptor), provided for
cross-language WebSphere MQ API compatibility.
|
|
getInt4Property(java.lang.String name)
Synonym for
getIntProperty(String), provided for cross-language WebSphere MQ API
compatibility.
|
|
getInt4Property(java.lang.String name,MQPropertyDescriptor descriptor)
Synonym for
getIntProperty(String, MQPropertyDescriptor), provided for cross-language
WebSphere MQ API compatibility.
|
|
getInt8Property(java.lang.String name)
Synonym for
getLongProperty(String), provided for cross-language WebSphere MQ API
compatibility.
|
|
getInt8Property(java.lang.String name,MQPropertyDescriptor descriptor)
Synonym for
getLongProperty(String, MQPropertyDescriptor), provided for cross-language
WebSphere MQ API compatibility.
|
|
getIntProperty(java.lang.String name)
Returns the value of the int property with the specified name.
|
|
getIntProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the int property with the specified name, filling in the specified
property descriptor.
|
|
getLongProperty(java.lang.String name)
Returns the value of the long property with the specified name.
|
|
getLongProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the long property with the specified name, filling in the specified
property descriptor.
|
|
getMessageLength()
Gets the number of bytes of message data in this message.
|
|
getObjectProperty(java.lang.String name)
Returns the value of the Java object property with the specified name.
|
|
getObjectProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the Java object property with the specified name, filling in the specified
property descriptor.
|
|
getPropertyNames(java.lang.String nameP)
Returns an Enumeration of all the property names matching the specified name.
|
|
getPropertyValidation()
Specifies whether validation of properties should take place when a property of the message is
set.
|
|
getShortProperty(java.lang.String name)
Returns the value of the short property with the specified name.
|
|
getShortProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the short property with the specified name, filling in the specified
property descriptor.
|
|
getStringProperty(java.lang.String name)
Returns the value of the String property with the specified name.
|
|
getStringProperty(java.lang.String name,MQPropertyDescriptor descriptor)
Returns the value of the String property with the specified name, filling in the specified
property descriptor.
|
|
getTotalMessageLength()
Gets the total number of bytes in the message as stored on the message queue on which this
message was held.
|
|
readBoolean()
Reads a boolean from the current position in the message buffer.
|
|
readByte()
Reads a byte from the current position in the message buffer.
|
|
readChar()
Reads a character from the current position in the message buffer.
|
|
readDecimal2()
Reads a 2-byte packed decimal number in the range -999 to 999.
|
|
readDecimal4()
Reads a 4-byte packed decimal number in the range -9,999,999 to 9,999,999.
|
|
readDecimal8()
Reads an 8-byte packed decimal number in the range -999,999,999,999,999 to 999,999,999,999,999.
|
|
readDouble()
Reads a double from the current position in the message buffer.
|
|
readFloat()
Reads a float from the current position in the message buffer.
|
|
readFully(byte[] b)
Fills a byte array with data from the message buffer.
|
|
readFully(byte[] b,int off,int len)
Partly fills a byte array with data from the message buffer.
|
|
readInt()
Reads an integer from the current position in the message buffer.
|
|
readInt2()
Identical to
readShort().
|
|
readInt4()
Synonym for
readInt(), provided for cross-language WMQ API compatibility.
|
|
readInt8()
Identical to
readLong().
|
|
readLine()
Reads a line of text from the message.
|
|
readLong()
Reads an integer from the current position in the message buffer.
|
|
readObject()
Reads an object carried in the message.
|
|
readShort()
Reads a short from the current position in the message buffer.
|
|
readString(int length)
Deprecated. use
readStringOfCharLength(int)method instead.
|
|
readStringOfByteLength(int numberOfBytes)
Reads a specified number of bytes and uses them to construct a new string using the character
set specified by
characterSet.
|
|
readStringOfCharLength(int numberOfChars)
Reads a string in the codeset identified by
characterSetand converts it
into Unicode.
|
|
readUInt2()
Identical to
readUnsignedShort(), provided for cross-language WMQ
API compatibility.
|
|
readUnsignedByte()
Reads an unsigned byte from the current position in the message buffer.
|
|
readUnsignedShort()
Reads an unsigned short from the current position in the message buffer.
|
|
readUTF()
Reads a UTF format String from the current position in the message buffer.
|
|
resizeBuffer(int size)
Indicates to the MQMessage class the size of buffer that might be required.
|
|
seek(int seekOffset)
Moves the cursor to a new absolute position in the message buffer.
|
|
setBooleanProperty(java.lang.String name,boolean value)
Sets a boolean property value with the specified name into the message, with the default
property descriptor.
|
|
setBooleanProperty(java.lang.String name,MQPropertyDescriptor descriptor,boolean value)
Sets a boolean property value with the specified name into the message, with the specified
property descriptor.
|
|
setByteProperty(java.lang.String name,byte value)
Sets a byte property value with the specified name into the message, with the default property
descriptor.
|
|
setByteProperty(java.lang.String name,MQPropertyDescriptor descriptor,byte value)
Sets a byte property value with the specified name into the message, with the specified
property descriptor.
|
|
setBytesProperty(java.lang.String name,byte[] value)
Sets a byte array property value with the specified name into the message, with the default
property descriptor.
|
|
setBytesProperty(java.lang.String name,MQPropertyDescriptor descriptor,byte[] value)
Sets a byte array property value with the specified name into the message, with the specified
property descriptor.
|
|
setDataOffset(int offset)
Moves the cursor to a new absolute position in the message buffer.
|
|
setDoubleProperty(java.lang.String name,double value)
Sets a double property value with the specified name into the message, with the default
property descriptor.
|
|
setDoubleProperty(java.lang.String name,MQPropertyDescriptor descriptor,double value)
Sets a double property value with the specified name into the message, with the specified
property descriptor.
|
|
setFloatProperty(java.lang.String name,float value)
Sets a float property value with the specified name into the message, with the default property
descriptor.
|
|
setFloatProperty(java.lang.String name,MQPropertyDescriptor descriptor,float value)
Sets a float property value with the specified name into the message, with the specified
property descriptor.
|
|
setInt2Property(java.lang.String name,MQPropertyDescriptor descriptor,short value)
Synonym for
setShortProperty(String, MQPropertyDescriptor, short), provided for
cross-language WebSphere MQ API compatibility.
|
|
setInt2Property(java.lang.String name,short value)
Synonym for
setShortProperty(String, short), provided for cross-language WebSphere MQ
API compatibility.
|
|
setInt4Property(java.lang.String name,int value)
Synonym for
setIntProperty(String, int), provided for cross-language WebSphere MQ API
compatibility.
|
|
setInt4Property(java.lang.String name,MQPropertyDescriptor descriptor,int value)
Synonym for
setIntProperty(String, MQPropertyDescriptor, int), provided for
cross-language WebSphere MQ API compatibility.
|
|
setInt8Property(java.lang.String name,long value)
Synonym for
setLongProperty(String, long), provided for cross-language WebSphere MQ
API compatibility.
|
|
setInt8Property(java.lang.String name,MQPropertyDescriptor descriptor,long value)
Synonym for
setLongProperty(String, MQPropertyDescriptor, long), provided for
cross-language WebSphere MQ API compatibility.
|
|
setIntProperty(java.lang.String name,int value)
Sets a int property value with the specified name into the message, with the default property
descriptor.
|
|
setIntProperty(java.lang.String name,MQPropertyDescriptor descriptor,int value)
Sets a int property value with the specified name into the message, with the specified property
descriptor.
|
|
setLongProperty(java.lang.String name,long value)
Sets a long property value with the specified name into the message, with the default property
descriptor.
|
|
setLongProperty(java.lang.String name,MQPropertyDescriptor descriptor,long value)
Sets a long property value with the specified name into the message, with the specified
property descriptor.
|
|
setObjectProperty(java.lang.String name,MQPropertyDescriptor descriptor,java.lang.Object value)
Sets a Java object property value with the specified name into the message, with the specified
property descriptor.
|
|
setObjectProperty(java.lang.String name,java.lang.Object value)
Sets a Java object property value with the specified name into the message, with the default
property descriptor.
|
|
setPropertyValidation(int propertyValidation)
Specifies whether validation of properties should take place when a property of the message is
set.
|
|
setShortProperty(java.lang.String name,MQPropertyDescriptor descriptor,short value)
Sets a short property value with the specified name into the message, with the specified
property descriptor.
|
|
setShortProperty(java.lang.String name,short value)
Sets a short property value with the specified name into the message, with the default property
descriptor.
|
|
setStringProperty(java.lang.String name,MQPropertyDescriptor descriptor,java.lang.String value)
Sets a String property value with the specified name into the message, with the specified
property descriptor.
|
|
setStringProperty(java.lang.String name,java.lang.String value)
Sets a String property value with the specified name into the message, with the default
property descriptor.
|
|
skipBytes(int n)
Moves the cursor forward in the message buffer.
|
|
write(byte[] b)
Writes an array of bytes into the message buffer at the current position.
|
|
write(byte[] b,int off,int len)
Writes a series of bytes into the message buffer at the current position.
|
|
write(int b)
Writes a byte into the message buffer at the current position.
|
|
writeBoolean(boolean v)
Writes a boolean into the message buffer at the current position.
|
|
writeByte(int v)
Writes a byte into the message buffer at the current position.
|
|
writeBytes(java.lang.String s)
Deprecated. This implements the
DataOutput.writeBytes(String) method which is
not a general string writing routine - it writes the low-order
bytes from the characters in the String to the Message, discarding the high-order
bytes. (In MQ, it is hard to see where behaviour would be desirable, but it is
mandatory as MQMessage implements the DataOutput interface.)No data conversion is performed by this method. If you wish to write a string to the message with appropriate handling of the character set currently in force, use writeString(String) instead of this method.
|
|
writeChar(int v)
Writes a Unicode character into the message buffer at the current position.
|
|
writeChars(java.lang.String s)
Writes a String as a sequence of Unicode characters into the message buffer at the current
position.
|
|
writeDecimal2(short v)
Writes a 2-byte packed decimal format number into the message buffer at the current position.
|
|
writeDecimal4(int v)
Writes a 4-byte packed decimal format number into the message buffer at the current position.
|
|
writeDecimal8(long v)
Writes an 8-byte packed decimal format number into the message buffer at the current position.
|
|
writeDouble(double v)
Writes a double into the message buffer at the current position.
|
|
writeFloat(float v)
Writes a float into the message buffer at the current position.
|
|
writeInt(int v)
Writes an int into the message buffer at the current position.
|
|
writeInt2(int v)
Identical to
writeShort(), provided for cross-language WMQ API
compatibility.
|
|
writeInt4(int v)
Synonym for
writeInt(), provided for cross-language WMQ API compatibility.
|
|
writeInt8(long v)
Synonym for
writeLong(), provided for cross-language WMQ API compatibility.
|
|
writeLong(long v)
Writes a long into the message buffer at the current position.
|
|
writeObject(java.lang.Object obj)
Writes an Object into the message.
|
|
writeShort(int v)
Writes a short into the message buffer at the current position.
|
|
writeString(java.lang.String s)
Writes a String into the message buffer at the current position, converting it to the codeset
identified by
characterSet.
|
|
writeUTF(java.lang.String str)
Writes a String in UTF format into the message buffer at the current position.
|
| Methods inherited from class com.ibm.mq.MQMD |
|---|
getVersion, setVersion |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
MQMessage
- public MQMessage()
Method Detail
getTotalMessageLength
- public int getTotalMessageLength( )
MQQueue.get()method fails with an error code that indicates that
the message has been truncated.
getMessageLength
- public int getMessageLength()
- throws java.io.IOException
java.io.IOException - if there is a problem with IO. getDataLength
- public int getDataLength()
- throws java.io.IOException
java.io.IOException - if there is a problem with IO. seek
- public void seek(int seekOffset)
- throws java.io.EOFException
seekOffset - the new value of the cursor position. java.io.EOFException - if offset takes cursor outside the message data. setDataOffset
- public void setDataOffset(int offset)
- throws java.io.EOFException
seek(), and is provided for cross-language compatibility with the other WMQ APIs.
offset - the new value of the cursor position. java.io.EOFException - if offset takes cursor outside the message data. getDataOffset
- public int getDataOffset()
- throws java.io.IOException
java.io.IOException - if there is a problem with IO. clearMessage
- public void clearMessage()
- throws java.io.IOException
java.io.IOException - if there is a problem with IO. resizeBuffer
- public void resizeBuffer(int size)
- throws java.io.IOException
MQQueue.get(MQMessage, MQGetMessageOptions)
, then this is the size of buffer allocated for the get request.
size - the new size of the buffer java.io.IOException - if there is a problem with IO. readBoolean
- public boolean readBoolean()
- throws java.io.IOException
- java.io.EOFException
readBoolean in interface java.io.DataInput
java.io.IOException - if there is a problem with IO. java.io.EOFException - if the read goes beyond the end of file. readByte
- public byte readByte()
- throws java.io.IOException
- java.io.EOFException
readByte in interface java.io.DataInput
java.io.IOException - if there is a problem with IO. java.io.EOFException - if the read goes beyond the end of file. readChar
- public char readChar()
- throws java.io.IOException
- java.io.EOFException
readChar in interface java.io.DataInput
java.io.IOException - if there is a problem with IO. java.io.EOFException - if the read goes beyond the end of file. readDouble
- public double readDouble()
- throws java.io.IOException
- java.io.EOFException
readDouble in interface java.io.DataInput
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian double if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if encoding is not equal to either of these values. java.io.EOFException - if the read goes beyond the end of file. readFloat
- public float readFloat()
- throws java.io.IOException
- java.io.EOFException
readFloat in interface java.io.DataInput
encodingequals
MQConstants.MQENC_INTEGER_NORMAL, a little-endian float if it equals
MQConstants.MQENC_INTEGER_REVERSED, or a java.io.IOException - if encoding is none of these. java.io.EOFException - if the read goes beyond the end of file. readFully
- public void readFully(byte[] b)
- throws java.io.IOException
readFully in interface java.io.DataInput
b - the byte array. java.io.IOException - if there is a problem with IO. readFully
- public void readFully(byte[] b,
- int off,
- int len)
- throws java.io.IOException
readFully in interface java.io.DataInput
b - the byte array. off - the offset into the message buffer where the reading starts. len - the number of bytes to be read. java.io.IOException - if there is a problem with IO. readStringOfByteLength
- public java.lang.String readStringOfByteLength( int numberOfBytes)
- throws java.io.IOException
- java.io.EOFException
characterSet. When the given bytes are not valid in the
given charset, the behavior of this method is dependant on the implementation of the JRE.
Where the byte length of a string is known, the entire String should be read in a single invocation of this method, thus avoiding problems where byte and char boundaries do not coincide.
numberOfBytes - The number of bytes to read. java.io.IOException - if there is a problem with IO. java.io.EOFException - if the read goes beyond the end of file. readStringOfCharLength
- public java.lang.String readStringOfCharLength( int numberOfChars)
- throws java.io.IOException
- java.io.EOFException
characterSetand converts it
into Unicode.
numberOfChars - The number of characters to read (which might differ from the number of
bytes according to the codeset, because some codesets use more than one byte per
character). java.io.IOException - if there is a problem with IO. java.io.EOFException - if the read goes beyond the end of file. readInt
- public int readInt()
- throws java.io.IOException
readInt in interface java.io.DataInput
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian integer if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if there is a problem with IO. readInt4
- public int readInt4()
- throws java.io.IOException
readInt(), provided for cross-language WMQ API compatibility.
java.io.IOException - if there is a problem with IO. readLine
- public java.lang.String readLine( )
- throws java.io.IOException
characterSet, and then reads in a line that has been terminated by \n,
\r, \r\n, EOF or the end of a UTF string.
readLine in interface java.io.DataInput
java.io.IOException - if there is a problem with IO. readLong
- public long readLong()
- throws java.io.IOException
readLong in interface java.io.DataInput
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian long if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if encoding is not equal to either of these values. readInt8
- public long readInt8()
- throws java.io.IOException
readLong(). Provided for cross-language WMQ API compatibility.
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian long if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if encoding is not equal to either of these values. readShort
- public short readShort()
- throws java.io.IOException
readShort in interface java.io.DataInput
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian short if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if encoding is not equal to either of these values. readInt2
- public short readInt2()
- throws java.io.IOException
readShort(). Provided for cross-language MQ API compatibility.
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian short if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if there is a problem with IO. readUTF
- public java.lang.String readUTF( )
- throws java.io.IOException
readUTF in interface java.io.DataInput
java.io.IOException - if there is a problem with IO. readUnsignedByte
- public int readUnsignedByte()
- throws java.io.IOException
readUnsignedByte in interface java.io.DataInput
java.io.IOException - if there is a problem with IO. readUnsignedShort
- public int readUnsignedShort()
- throws java.io.IOException
readUnsignedShort in interface java.io.DataInput
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian short if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if encoding is not equal to either of these values. readUInt2
- public int readUInt2()
- throws java.io.IOException
readUnsignedShort(), provided for cross-language WMQ
API compatibility.
encodingis equal to
MQConstants.MQENC_INTEGER_NORMAL, or a little-endian short if it is equal to
MQConstants.MQENC_INTEGER_REVERSED. java.io.IOException - if there is a problem with IO. readString
- @Deprecated
- public java.lang.String readString( int length)
- throws java.io.IOException
readStringOfCharLength(int)method instead.
characterSetand converts it
into Unicode.
length - The number of characters to read (which might differ from the number of bytes
according to the codeset, since some codesets use more than one byte per character). java.io.IOExceptionreadDecimal2
- public short readDecimal2()
- throws java.io.IOException
encodingequals MQConstants.MQENC_DECIMAL_NORMAL
or a little-endian short if it equals MQConstants.MQENC_DECIMAL_REVERSED. java.io.IOException - if there is a problem with IO. readDecimal4
- public int readDecimal4()
- throws java.io.IOException
encodingequals MQConstants.MQENC_DECIMAL_NORMAL
or a little-endian int if it equals MQConstants.MQENC_DECIMAL_REVERSED. java.io.IOException - if there is a problem with IO. readDecimal8
- public long readDecimal8()
- throws java.io.IOException
encodingequals MQConstants.MQENC_DECIMAL_NORMAL
or a little-endian long if it equals MQConstants.MQENC_DECIMAL_REVERSED. java.io.IOException - if there is a problem with IO. readObject
- public java.lang.Object readObject( )
- throws java.lang.ClassNotFoundException
- java.io.InvalidClassException
- java.io.StreamCorruptedException
- java.io.OptionalDataException
- java.io.IOException
java.lang.ClassNotFoundExceptionjava.io.InvalidClassExceptionjava.io.StreamCorruptedExceptionjava.io.OptionalDataExceptionjava.io.IOExceptionskipBytes
- public int skipBytes(int n)
- throws java.io.IOException
- java.io.EOFException
skipBytes in interface java.io.DataInput
n - the number of bytes to move. java.io.IOException - if there is a problem with IO. java.io.EOFException - if the skip goes beyond the end of file. write
- public void write(int b)
- throws java.io.IOException
write in interface java.io.DataOutput
b - the byte to be written java.io.IOException - if there is a problem with IO. write
- public void write(byte[] b)
- throws java.io.IOException
write in interface java.io.DataOutput
b - the array to be written. java.io.IOException - if there is a problem with IO. write
- public void write(byte[] b,
- int off,
- int len)
- throws java.io.IOException
write in interface java.io.DataOutput
b - the array from which the bytes are written. off - the offset to the first byte in the array to be written. len - the number of bytes to be written. java.io.IOException - if there is a problem with IO. writeBoolean
- public void writeBoolean(boolean v)
- throws java.io.IOException
writeBoolean in interface java.io.DataOutput
v - the boolean to be written. java.io.IOException - if there is a problem with IO. writeByte
- public void writeByte(int v)
- throws java.io.IOException
writeByte in interface java.io.DataOutput
v - the byte to be written. java.io.IOException - if there is a problem with IO. writeBytes
- @Deprecated
- public void writeBytes( java.lang.String s)
- throws java.io.IOException
DataOutput.writeBytes(String) method which is
not a general string writing routine - it writes the low-order
bytes from the characters in the String to the Message, discarding the high-order
bytes. (In MQ, it is hard to see where behaviour would be desirable, but it is
mandatory as MQMessage implements the DataOutput interface.)No data conversion is performed by this method. If you wish to write a string to the message with appropriate handling of the character set currently in force, use
writeString(String) instead of this method.
writeBytes in interface java.io.DataOutput
s - the String to be written. java.io.IOException - if there is a problem with IO. writeChar
- public void writeChar(int v)
- throws java.io.IOException
writeChar in interface java.io.DataOutput
v - the character to be written, expressed as an int. java.io.IOException - if there is a problem with IO. writeChars
- public void writeChars(java.lang.String s)
- throws java.io.IOException
writeChars in interface java.io.DataOutput
s - the String to be written. java.io.IOException - if there is a problem with IO. writeDouble
- public void writeDouble(double v)
- throws java.io.IOException
encoding.
Values of MQConstants.MQENC_FLOAT_IEEE_NORMAL and MQENC_IEEE_FLOAT_REVERSED write IEEE standard floats in big-endian and little-endian formats respectively.
A value of MQConstants.MQENC_FLOAT_S390 writes a
writeDouble in interface java.io.DataOutput
v - the double to be written. java.io.IOException - if there is a problem with IO. writeFloat
- public void writeFloat(float v)
- throws java.io.IOException
encoding.
Values of MQConstants.MQENC_FLOAT_IEEE_NORMAL and MQENC_IEEE_FLOAT_REVERSED write IEEE standard floats in big-endian and little-endian formats respectively.
A value of MQConstants.MQENC_FLOAT_S390 writes a
writeFloat in interface java.io.DataOutput
v - the float to be written. java.io.IOException - if there is a problem with IO. writeInt
- public void writeInt(int v)
- throws java.io.IOException
encoding.
Values of MQConstants.MQENC_INTEGER_NORMAL and MQConstants.MQENC_INTEGER_REVERSED write integers in big-endian and little-endian formats respectively.
writeInt in interface java.io.DataOutput
v - the int to be written. java.io.IOException - if there is a problem with IO. writeInt4
- public void writeInt4(int v)
- throws java.io.IOException
writeInt(), provided for cross-language WMQ API compatibility.
v - the int to be written java.io.IOException - if there is a problem with IO. writeLong
- public void writeLong(long v)
- throws java.io.IOException
encoding.
Values of MQConstants.MQENC_INTEGER_NORMAL and MQConstants.MQENC_INTEGER_REVERSED write longs in big-endian and little-endian formats respectively.
writeLong in interface java.io.DataOutput
v - the long to be written. java.io.IOException - if there is a problem with IO. writeInt8
- public void writeInt8(long v)
- throws java.io.IOException
writeLong(), provided for cross-language WMQ API compatibility.
v - the long to be written java.io.IOException - if there is a problem with IO. writeShort
- public void writeShort(int v)
- throws java.io.IOException
encoding.
Values of MQConstants.MQENC_INTEGER_NORMAL and MQConstants.MQENC_INTEGER_REVERSED write shorts in big-endian and little-endian formats respectively.
A value of MQConstants.MQENC_FLOAT_S390 writes a
writeShort in interface java.io.DataOutput
v - the short to be written. java.io.IOException - if there is a problem with IO. writeInt2
- public void writeInt2(int v)
- throws java.io.IOException
writeShort(), provided for cross-language WMQ API
compatibility.
v - the long to be written. java.io.IOException - if there is a problem with IO. writeDecimal2
- public void writeDecimal2(short v)
- throws java.io.IOException
encoding. A value of
MQConstants.MQENC_DECIMAL_NORMAL writes a big-endian packed decimal and a value of
MQConstants.MQENC_DECIMAL_REVERSED writes a little-endian packed decimal.
v - is the number to be written in the range -999 to 999. java.io.IOException - if there is a problem with IO. writeDecimal4
- public void writeDecimal4(int v)
- throws java.io.IOException
encoding. A value of
MQConstants.MQENC_DECIMAL_NORMAL writes a big-endian packed decimal and a value of
MQConstants.MQENC_DECIMAL_REVERSED writes a little-endian packed decimal.
v - is the number to be written in the range -9,999,999 to 9,999,999. java.io.IOException - if there is a problem with IO. writeDecimal8
- public void writeDecimal8(long v)
- throws java.io.IOException
encoding. A value of
MQConstants.MQENC_DECIMAL_NORMAL writes a big-endian packed decimal and a value of
MQConstants.MQENC_DECIMAL_REVERSED writes a little-endian packed decimal.
v - is the number to be written int the range -999,999,999,999,999 to 999,999,999,999,999. java.io.IOException - if there is a problem with IO. writeUTF
- public void writeUTF(java.lang.String str)
- throws java.io.IOException
writeUTF in interface java.io.DataOutput
str - the String to be written. java.io.IOException - if there is a problem with IO. writeString
- public void writeString(java.lang.String s)
- throws java.io.IOException
characterSet.
s - the String to be written. java.io.IOException - if there is a problem with IO. writeObject
- public void writeObject(java.lang.Object obj)
- throws java.io.IOException
obj - the Object to be written. java.io.IOException - if there is a problem with IO. getPropertyValidation
- public int getPropertyValidation( )
- MQCMHO_DEFAULT_VALIDATION, the default
- MQCMHO_VALIDATE
- MQCMHO_NO_VALIDATION
true if property validation will take place setPropertyValidation
- public void setPropertyValidation( int propertyValidation)
- MQCMHO_DEFAULT_VALIDATION, the default
- MQCMHO_VALIDATE
- MQCMHO_NO_VALIDATION
propertyValidation - set to true if property validation should take place setBooleanProperty
- public void setBooleanProperty( java.lang.String name,
- boolean value)
- throws MQException
name - the name of the boolean property. value - the boolean property value to set. MQException - if the property name is invalid. setBooleanProperty
- public void setBooleanProperty( java.lang.String name,
- MQPropertyDescriptor descriptor,
- boolean value)
- throws MQException
name - the name of the boolean property. descriptor - the attributes of the property itself. value - the boolean property value to set. MQException - if the property name is invalid. setBytesProperty
- public void setBytesProperty(java.lang.String name,
- byte[] value)
- throws MQException
name - the name of the byte array property. value - the byte array property value to set. MQException - if the property name is invalid. setBytesProperty
- public void setBytesProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- byte[] value)
- throws MQException
name - the name of the byte array property. descriptor - the attributes of the property itself. value - the byte array property value to set. MQException - if the property name is invalid. setByteProperty
- public void setByteProperty(java.lang.String name,
- byte value)
- throws MQException
name - the name of the byte property. value - the byte property value to set. MQException - if the property name is invalid. setByteProperty
- public void setByteProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- byte value)
- throws MQException
name - the name of the byte property. descriptor - the attributes of the property itself. value - the byte property value to set. MQException - if the property name is invalid. setShortProperty
- public void setShortProperty(java.lang.String name,
- short value)
- throws MQException
name - the name of the short property. value - the short property value to set. MQException - if the property name is invalid. setShortProperty
- public void setShortProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- short value)
- throws MQException
name - the name of the short property. descriptor - the attributes of the property itself. value - the short property value to set. MQException - if the property name is invalid. setInt2Property
- public void setInt2Property(java.lang.String name,
- short value)
- throws MQException
setShortProperty(String, short), provided for cross-language WebSphere MQ
API compatibility.
name - the name of the short property. value - the short property value to set. MQException - if the property name is invalid. setInt2Property
- public void setInt2Property(java.lang.String name,
- MQPropertyDescriptor descriptor,
- short value)
- throws MQException
setShortProperty(String, MQPropertyDescriptor, short), provided for
cross-language WebSphere MQ API compatibility.
name - the name of the short property. descriptor - the attributes of the property itself. value - the short property value to set. MQException - if the property name is invalid. setIntProperty
- public void setIntProperty(java.lang.String name,
- int value)
- throws MQException
name - the name of the int property. value - the int property value to set. MQException - if the property name is invalid. setIntProperty
- public void setIntProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- int value)
- throws MQException
name - the name of the int property. descriptor - the attributes of the property itself. value - the int property value to set. MQException - if the property name is invalid. setInt4Property
- public void setInt4Property(java.lang.String name,
- int value)
- throws MQException
setIntProperty(String, int), provided for cross-language WebSphere MQ API
compatibility.
name - the name of the int property. value - the int property value to set. MQException - if the property name is invalid. setInt4Property
- public void setInt4Property(java.lang.String name,
- MQPropertyDescriptor descriptor,
- int value)
- throws MQException
setIntProperty(String, MQPropertyDescriptor, int), provided for
cross-language WebSphere MQ API compatibility.
name - the name of the int property. descriptor - the attributes of the property itself. value - the int property value to set. MQException - if the property name is invalid. setLongProperty
- public void setLongProperty(java.lang.String name,
- long value)
- throws MQException
name - the name of the long property. value - the long property value to set. MQException - if the property name is invalid. setLongProperty
- public void setLongProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- long value)
- throws MQException
name - the name of the long property. descriptor - the attributes of the property itself. value - the long property value to set. MQException - if the property name is invalid. setInt8Property
- public void setInt8Property(java.lang.String name,
- long value)
- throws MQException
setLongProperty(String, long), provided for cross-language WebSphere MQ
API compatibility.
name - the name of the long property. value - the long property value to set. MQException - if the property name is invalid. setInt8Property
- public void setInt8Property(java.lang.String name,
- MQPropertyDescriptor descriptor,
- long value)
- throws MQException
setLongProperty(String, MQPropertyDescriptor, long), provided for
cross-language WebSphere MQ API compatibility.
name - the name of the long property. descriptor - the attributes of the property itself. value - the long property value to set. MQException - if the property name is invalid. setFloatProperty
- public void setFloatProperty(java.lang.String name,
- float value)
- throws MQException
name - the name of the float property. value - the float property value to set. MQException - if the property name is invalid. setFloatProperty
- public void setFloatProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- float value)
- throws MQException
name - the name of the float property. descriptor - the attributes of the property itself. value - the float property value to set. MQException - if the property name is invalid. setDoubleProperty
- public void setDoubleProperty(java.lang.String name,
- double value)
- throws MQException
name - the name of the double property. value - the double property value to set. MQException - if the property name is invalid. setDoubleProperty
- public void setDoubleProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- double value)
- throws MQException
name - the name of the double property. descriptor - the attributes of the property itself. value - the double property value to set. MQException - if the property name is invalid. setStringProperty
- public void setStringProperty(java.lang.String name,
- java.lang.String value)
- throws MQException
name - the name of the String property. value - the String property value to set. MQException - if the property name is invalid. setStringProperty
- public void setStringProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- java.lang.String value)
- throws MQException
name - the name of the String property. descriptor - the attributes of the property itself. value - the String property value to set. MQException - if the property name is invalid. setObjectProperty
- public void setObjectProperty(java.lang.String name,
- java.lang.Object value)
- throws MQException
name - the name of the Java object property. value - the Java object property value to set. MQException - if the property name is invalid. setObjectProperty
- public void setObjectProperty(java.lang.String name,
- MQPropertyDescriptor descriptor,
- java.lang.Object value)
- throws MQException
name - the name of the Java object property. descriptor - the attributes of the property itself. value - the Java object property value to set. MQException - if the property name is invalid. getBooleanProperty
- public boolean getBooleanProperty( java.lang.String name)
- throws MQException
name - the name of the boolean property. MQException - if property does not exist or the type conversion is invalid. getBooleanProperty
- public boolean getBooleanProperty( java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the boolean property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getBytesProperty
- public byte[] getBytesProperty( java.lang.String name)
- throws MQException
name - the name of the byte array property. MQException - if property does not exist or the type conversion is invalid. getBytesProperty
- public byte[] getBytesProperty( java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the byte array property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getByteProperty
- public byte getByteProperty(java.lang.String name)
- throws MQException
name - the name of the byte property. MQException - if property does not exist or the type conversion is invalid. getByteProperty
- public byte getByteProperty(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the byte property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getShortProperty
- public short getShortProperty(java.lang.String name)
- throws MQException
name - the name of the short property. MQException - if property does not exist or the type conversion is invalid. getShortProperty
- public short getShortProperty(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the short property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getInt2Property
- public short getInt2Property(java.lang.String name)
- throws MQException
getShortProperty(String), provided for cross-language WebSphere MQ API
compatibility.
name - the name of the short property. MQException - if property does not exist or the type conversion is invalid. getInt2Property
- public short getInt2Property(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
getShortProperty(String, MQPropertyDescriptor), provided for
cross-language WebSphere MQ API compatibility.
name - the name of the short property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getIntProperty
- public int getIntProperty(java.lang.String name)
- throws MQException
name - the name of the int property. MQException - if property does not exist or the type conversion is invalid. getIntProperty
- public int getIntProperty(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the int property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getInt4Property
- public int getInt4Property(java.lang.String name)
- throws MQException
getIntProperty(String), provided for cross-language WebSphere MQ API
compatibility.
name - the name of the int property. MQException - if property does not exist or the type conversion is invalid. getInt4Property
- public int getInt4Property(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
getIntProperty(String, MQPropertyDescriptor), provided for cross-language
WebSphere MQ API compatibility.
name - the name of the int property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getLongProperty
- public long getLongProperty(java.lang.String name)
- throws MQException
name - the name of the long property. MQException - if property does not exist or the type conversion is invalid. getLongProperty
- public long getLongProperty(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the long property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getInt8Property
- public long getInt8Property(java.lang.String name)
- throws MQException
getLongProperty(String), provided for cross-language WebSphere MQ API
compatibility.
name - the name of the long property. MQException - if property does not exist or the type conversion is invalid. getInt8Property
- public long getInt8Property(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
getLongProperty(String, MQPropertyDescriptor), provided for cross-language
WebSphere MQ API compatibility.
name - the name of the long property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getFloatProperty
- public float getFloatProperty(java.lang.String name)
- throws MQException
name - the name of the float property. MQException - if property does not exist or the type conversion is invalid. getFloatProperty
- public float getFloatProperty(java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the float property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getDoubleProperty
- public double getDoubleProperty( java.lang.String name)
- throws MQException
name - the name of the double property. MQException - if property does not exist or the type conversion is invalid. getDoubleProperty
- public double getDoubleProperty( java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the double property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getStringProperty
- public java.lang.String getStringProperty( java.lang.String name)
- throws MQException
name - the name of the String property. MQException - if property does not exist or the type conversion is invalid. getStringProperty
- public java.lang.String getStringProperty( java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
name - the name of the String property. descriptor - the attributes of the property itself. MQException - if property does not exist or the type conversion is invalid. getObjectProperty
- public java.lang.Object getObjectProperty( java.lang.String name)
- throws MQException
setObjectProperty(String, Object) method
call, or its equivalent primitive #set*Property method.
name - the name of the Java object property. MQException - if property does not exist getObjectProperty
- public java.lang.Object getObjectProperty( java.lang.String name,
- MQPropertyDescriptor descriptor)
- throws MQException
setObjectProperty(String, Object) method
call, or its equivalent primitive #set*Property method.
name - the name of the Java object property. descriptor - the attributes of the property itself. MQException - if property does not exist getPropertyNames
- public java.util.Enumeration<java.lang.String> getPropertyNames( java.lang.String nameP)
- throws MQException
nameP - the name of the property to match on. MQException - if the property name is invalid. deleteProperty
- public void deleteProperty(java.lang.String nameP)
- throws MQException
nameP - the name of the property to delete. MQException - if the property name is invalid or does not exist.