com.ibm.mq.headers

Interface MQData

All known subinterfaces:
MQHeader
All known implementing classes:
com.ibm.mq.headers.internal.Header, MQCFBF, MQCFBF, MQCFBS, MQCFBS, MQCFGR, MQCFGR, MQCFH, MQCFH, MQCFIF, MQCFIF, MQCFIL, MQCFIL, MQCFIL64, MQCFIL64, MQCFIN, MQCFIN, MQCFIN64, MQCFIN64, MQCFSF, MQCFSF, MQCFSL, MQCFSL, MQCFST, MQCFST, MQCIH, MQDH, MQDLH, MQEPH, MQIIH, MQMD, MQMD1, MQMDE, MQRFH, MQRFH2, MQRMH, MQSAPH, MQTM, MQTM2, MQTMC2, MQWIH, MQXQH, PCFFilterParameter, PCFFilterParameter, PCFHeader, PCFHeader, PCFMessage, PCFMessage, PCFParameter, PCFParameter

  1. public interface MQData
Interface representing a data element in an MQ message. This low-level interface represents content that can be read and written, and occupies a known number of bytes in a message. The MQHeader interface extends MQData and adds a representation of structured content with named fields.
See Also:
MQHeader

Method Summary

Modifier and Type Method and Description
  1. int
read(java.io.DataInput message)
Reads content from a message and returns the number of bytes consumed.
  1. int
read(java.io.DataInput message,int encoding,int characterSet)
Reads content from a message or byte stream and returns the number of bytes consumed.
  1. int
size()
Returns the size in bytes occupied by this data element in a message.
  1. int
write(java.io.DataOutput message)
Writes the content of this data element to a message and returns the number of bytes written.
  1. int
write(java.io.DataOutput message,int encoding,int characterSet)
Writes the content of this data element to a message or byte stream and returns the number of bytes written.

Method Detail

read

  1. int read(java.io.DataInput message)
  2. throws MQDataException
  3. java.io.IOException
Reads content from a message and returns the number of bytes consumed. The content is interpreted (if applicable) using the encoding and CCSID of the message descriptor.
Parameters:
message - the MQMessage to read from.
Throws:
java.io.IOException

read

  1. int read(java.io.DataInput message,
  2. int encoding,
  3. int characterSet)
  4. throws java.lang.Exception
  5. MQDataException
  6. java.io.IOException
Reads content from a message or byte stream and returns the number of bytes consumed. The content is interpreted (if applicable) using the specified encoding and CCSID.
Parameters:
message - the message.
encoding - the numeric encoding. see (CMQC.MQENC_* for values).
characterSet - the Coded Character Set Identifier.
Throws:
java.lang.Exception - (to allow the com.ibm.pcf classes to throw MQException)
java.io.IOException

write

  1. int write(java.io.DataOutput message)
  2. throws java.io.IOException
Writes the content of this data element to a message and returns the number of bytes written. The content is encoded in (if applicable) using the encoding and CCSID of the message descriptor.
Parameters:
message - the message.
Throws:
java.io.IOException

write

  1. int write(java.io.DataOutput message,
  2. int encoding,
  3. int characterSet)
  4. throws java.io.IOException
Writes the content of this data element to a message or byte stream and returns the number of bytes written. The content is encoded (if applicable) using the specified encoding and CCSID.
Parameters:
characterSet - the Coded Character Set Identifier.
message - the message.
encoding - the numeric encoding. see (CMQC.MQENC_* for values)._
Throws:
java.io.IOException

size

  1. int size()
Returns the size in bytes occupied by this data element in a message.