com.ibm.mq.headers

Interface MQData

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int read(java.io.DataInput message)
      Reads content from a message.
      int read(java.io.DataInput message, int encoding, int characterSet)
      Reads content from a message or byte stream.
      int size() 
      int write(java.io.DataOutput message)
      Writes the content of this data element to a message.
      int write(java.io.DataOutput message, int encoding, int characterSet)
      Writes the content of this data element to a message or byte stream.
    • Method Detail

      • read

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

        int read(java.io.DataInput message,
               int encoding,
               int characterSet)
                 throws java.lang.Exception,
                        MQDataException,
                        java.io.IOException
        Reads content from a message or byte stream. 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.
        Returns:
        the number of bytes consumed.
        Throws:
        java.lang.Exception - (to allow the com.ibm.pcf classes to throw MQException)
        MQDataException
        java.io.IOException
      • write

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

        int write(java.io.DataOutput message,
                int encoding,
                int characterSet)
                  throws java.io.IOException
        Writes the content of this data element to a message or byte stream. 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)._
        Returns:
        the number of bytes written
        Throws:
        java.io.IOException
      • size

        int size()
        Returns:
        the size in bytes occupied by this data element in a message.
(c) Copyright IBM Corp. 2008, 2015. All Rights Reserved.