Methods
- ClearMessage
public void ClearMessage()Throws IOException.
Discards any data in the message buffer and sets the data offset back to zero.
- ReadBoolean
public bool ReadBoolean()Throws IOException.
Reads a (signed) byte from the current position in the message buffer.
- ReadByte
public byte ReadByte()Throws IOException.
Reads a byte from the current position in the message buffer.
- ReadBytes
public byte[] ReadBytes(int count)Throws IOException.
Reads byte['count'] ('count' bytes) from the buffer starting at the data pointer. After the data has been read the data pointer is incremented by 'count'.
- ReadChar
public char ReadChar()Throws IOException, EndOfStreamException.
Reads a Unicode character from the current position in the message buffer.
- ReadDecimal2
public short ReadDecimal2()Throws IOException, EndOfStreamException.
Reads a 2-byte packed decimal number (-999 to 999). The behavior of this method is controlled by the value of the encoding member variable. A value of MQC.MQENC_DECIMAL_NORMAL reads a big-endian packed decimal number; a value of MQC.MQENC_DECIMAL_REVERSED reads a little-endian packed decimal number.
- ReadDecimal4
public int readDecimal4()Throws IOException, EndOfStreamException.
Reads a 4-byte packed decimal number (-9999999 to 9999999). The behavior of this method is controlled by the value of the encoding member variable. A value of MQC.MQENC_DECIMAL_NORMAL reads a big-endian packed decimal number; a value of MQC.MQENC_DECIMAL_REVERSED reads a little-endian packed decimal number.
- ReadDecimal8
public long ReadDecimal8()Throws IOException, EndOfStreamException.
Reads an 8-byte packed decimal number (-999999999999999 to 999999999999999). The behavior of this method is controlled by the encoding member variable. A value of MQC.MQENC_DECIMAL_NORMAL reads a big-endian packed decimal number; a value of MQC.MQENC_DECIMAL_REVERSED reads a little-endian packed decimal number.
- ReadDouble
public double ReadDouble()Throws IOException, EndOfStreamException.
Reads a double from the current position in the message buffer. The value of the encoding member variable determines the behavior of this method.
Values of MQC.MQENC_FLOAT_IEEE_NORMAL and MQC.MQENC_FLOAT_IEEE_REVERSED read IEEE standard doubles in big-endian and little-endian formats respectively.
A value of MQC.MQENC_FLOAT_S390 reads a System/390 format floating point number.
- ReadFloat
public float ReadFloat()Throws IOException, EndOfStreamException.
Reads a float from the current position in the message buffer. The value of the encoding member variable determines the behavior of this method.
Values of MQC.MQENC_FLOAT_IEEE_NORMAL and MQC.MQENC_FLOAT_IEEE_REVERSED read IEEE standard floats in big-endian and little-endian formats respectively.
A value of MQC.MQENC_FLOAT_S390 reads a System/390 format floating point number.
- ReadFully
public void ReadFully(ref byte[] b)Throws Exception, EndOfStreamException.
Fills the byte array
b with data from the message buffer.
- ReadFully
public void ReadFully(ref sbyte[] b)Throws Exception, EndOfStreamException.
Fills the sbyte array
b with data from the message buffer.
- ReadFully
public void ReadFully(ref byte[] b, int off, int len)Throws IOException, EndOfStreamException.
Fills len elements of the byte array b with data from the message buffer, starting at offset off.
- ReadFully
public void ReadFully(ref sbyte[] b, int off, int len)Throws IOException, EndOfStreamException.
Fills len elements of the sbyte array b with data from the message buffer, starting at offset off.
- ReadInt
public int ReadInt()Throws IOException, EndOfStreamException.
Reads an integer from the current position in the message buffer. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL reads a big-endian integer; a value of MQC.MQENC_INTEGER_REVERSED reads a little-endian integer.
- ReadInt2
public short ReadInt2()Throws IOException, EndOfStreamException.
Synonym for ReadShort(), provided for cross-language WebSphere MQ API compatibility.
- ReadInt4
public int ReadInt4()Throws IOException, EndOfStreamException.
Synonym for ReadInt(), provided for cross-language WebSphere MQ API compatibility.
- ReadInt8
public long ReadInt8()Throws IOException, EndOfStreamException.
Synonym for ReadLong(), provided for cross-language WebSphere MQ API compatibility.
- ReadLine
public String ReadLine()Throws IOException.
Converts from the codeset identified in the characterSet member variable to Unicode, and then reads in a line that has been terminated by \n, \r, \r\n, or EOF.
- ReadLong
public long ReadLong()Throws IOException, EndOfStreamException.
Reads a long from the current position in the message buffer. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL reads a big-endian long; a value of MQC.MQENC_INTEGER_REVERSED reads a little-endian long.
- ReadObject
public Object ReadObject()Throws SerialisationException, IOException.
Reads an object from the message buffer. The class of the object, the signature of the class, and the value of the non-transient and non-static fields of the class are all read.
- ReadShort
public short ReadShort()Throws IOException, EndOfStreamException.
Reads a short from the current position in the message buffer. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL reads a big-endian short; a value of MQC.MQENC_INTEGER_REVERSED reads a little-endian short.
- ReadString
public String ReadString(int length)Throws IOException, EndOfStreamException.
Reads a string in the codeset identified by the characterSet member variable, and convert it into Unicode.
Parameters:
- length
- The number of characters to read (which may differ from the number of bytes according to the codeset, because some codesets use more than one byte per character).
- ReadUInt2
public ushort ReadUInt2()Throws IOException, EndOfStreamException.
Synonym for ReadUnsignedShort(), provided for cross-language WebSphere MQ API compatibility.
- ReadUnsignedByte
public byte ReadUnsignedByte()Throws IOException, EndOfStreamException.
Reads an unsigned byte from the current position in the message buffer.
- ReadUnsignedShort
public ushort ReadUnsignedShort()Throws IOException, EndOfStreamException.
Reads an unsigned short from the current position in the message buffer. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL reads a big-endian unsigned short; a value of MQC.MQENC_INTEGER_REVERSED reads a little-endian unsigned short.
- ReadUTF
public String ReadUTF()Throws IOException.
Reads a UTF string, prefixed by a 2-byte length field, from the current position in the message buffer.
- ResizeBuffer
public void ResizeBuffer(int size)Throws IOException.
A hint to the MQMessage object about the size of buffer that might be required for subsequent get operations. If the message currently contains message data, and the new size is less than the current size, the message data is truncated.
- Seek
public void Seek(int pos)Throws IOException, ArgumentOutOfRangeException ArgumentException.
Moves the cursor to the absolute position in the message buffer given by pos. Subsequent reads and writes act at this position in the buffer.
- SkipBytes
public int SkipBytes(int n)Throws IOException, EndOfStreamException.
Moves forward
n bytes in the message buffer.
This method blocks until one of the following occurs:
- All the bytes are skipped
- The end of message buffer is detected
- An exception is thrown
Returns the number of bytes skipped, which is always n.
- Write
public void Write(int b)Throws IOException.
Writes a byte into the message buffer at the current position.
- Write
public void Write(byte[] b)Throws IOException.
Writes an array of bytes into the message buffer at the current position.
- Write
public void Write(sbyte[] b)Throws IOException.
Writes an array of sbytes into the message buffer at the current position.
- Write
public void Write(byte[] b, int off, int len)Throws IOException.
Writes a series of bytes into the message buffer at the current position. len bytes are written, taken from offset off in the array b.
- Write
public void Write(sbyte b[], int off, int len)Throws IOException.
Writes a series of sbytes into the message buffer at the current position. len sbytes are written, taken from offset off in the array b.
- WriteBoolean
public void WriteBoolean(boolean v)Throws IOException.
Writes a boolean into the message buffer at the current position.
- WriteByte
public void WriteByte(int v)Throws IOException.
Writes a byte into the message buffer at the current position.
- WriteByte
public void WriteByte(byte value)Throws IOException.
Writes a byte into the message buffer at the current position.
- WriteByte
public void WriteByte(sbyte value)Throws IOException.
Writes an sbyte into the message buffer at the current position.
- WriteBytes
public void WriteBytes(String s)Throws IOException.
Writes the string to the message buffer as a sequence of bytes. Each character in the string is written in sequence by discarding its high eight bits.
- WriteChar
public void WriteChar(int v)Throws IOException.
Writes a Unicode character into the message buffer at the current position.
- WriteChars
public void WriteChars(String s)Throws IOException.
Writes a string as a sequence of Unicode characters into the message buffer at the current position.
- WriteDecimal2
public void WriteDecimal2(short v)Throws IOException, MQException.
Writes a 2-byte packed decimal format number into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_DECIMAL_NORMAL writes a big-endian packed decimal; a value of MQC.MQENC_DECIMAL_REVERSED writes a little-endian packed decimal.
Parameters
- v
- can be in the range -999 to 999.
- WriteDecimal4
public void WriteDecimal4(int v)Throws IOException, MQException.
Writes a 4-byte packed decimal format number into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_DECIMAL_NORMAL writes a big-endian packed decimal; a value of MQC.MQENC_DECIMAL_REVERSED writes a little-endian packed decimal.
Parameters
- v
- can be in the range -9999999 to 9999999.
- WriteDecimal8
public void WriteDecimal8(long v)Throws IOException, MQException.
Writes an 8-byte packed decimal format number into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_DECIMAL_NORMAL writes a big-endian packed decimal; a value of MQC.MQENC_DECIMAL_REVERSED writes a little-endian packed decimal.
Parameters:
- v
- can be in the range -999999999999999 to 999999999999999.
- WriteDouble
public void WriteDouble(double v)Throws IOException, MQException.
Writes a double into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
Values of MQC.MQENC_FLOAT_IEEE_NORMAL and MQC.MQENC_FLOAT_IEEE_REVERSED write IEEE standard floats in big-endian and little-endian formats respectively.
A value of MQC.MQENC_FLOAT_S390 writes a System/390 format floating point number. Note that the range of IEEE doubles is greater than the range of S/390 double precision floating point numbers, so very large numbers cannot be converted.
- WriteFloat
public void WriteFloat(float v)Throws IOException, MQException.
Writes a float into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
Values of MQC.MQENC_FLOAT_IEEE_NORMAL and MQC.MQENC_FLOAT_IEEE_REVERSED write IEEE standard floats in big-endian and little-endian formats respectively.
A value of MQC.MQENC_FLOAT_S390 writes a System/390 format floating point number.
- WriteInt
public void WriteInt(int v)Throws IOException.
Writes an integer into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL writes a big-endian integer; a value of MQC.MQENC_INTEGER_REVERSED writes a little-endian integer.
- WriteInt2
public void WriteInt2(int v)Throws IOException.
Synonym for WriteShort(), provided for cross-language WebSphere MQ API compatibility.
- WriteInt4
public void WriteInt4(int v)Throws IOException.
Synonym for WriteInt(), provided for cross-language WebSphere MQ API compatibility.
- WriteInt8
public void WriteInt8(long v)Throws IOException.
Synonym for WriteLong(), provided for cross-language WebSphere MQ API compatibility.
- WriteLong
public void WriteLong(long v)Throws IOException.
Writes a long into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL writes a big-endian long; a value of MQC.MQENC_INTEGER_REVERSED writes a little-endian long.
- WriteObject
public void WriteObject(Object obj)Throws IOException.
Writes the specified object to the message buffer. The class of the object, the signature of the class, and the values of the non-transient and non-static fields of the class and all its supertypes are all written.
- WriteShort
public void WriteShort(int v)Throws IOException.
Writes a short into the message buffer at the current position. The value of the encoding member variable determines the behavior of this method.
A value of MQC.MQENC_INTEGER_NORMAL writes a big-endian short; a value of MQC.MQENC_INTEGER_REVERSED writes a little-endian short.
- WriteString
public void WriteString(String str)Throws IOException.
Writes a string into the message buffer at the current position, converting it to the codeset identified by the characterSet member variable.
- WriteUTF
public void WriteUTF(String str)Throws IOException.
Writes a UTF string, prefixed by a 2-byte length field, into the message buffer at the current position.
csqzav0560