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
public interface MQDataInterface 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
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intread(java.io.DataInput message)Reads content from a message.intread(java.io.DataInput message, int encoding, int characterSet)Reads content from a message or byte stream.intsize()intwrite(java.io.DataOutput message)Writes the content of this data element to a message.intwrite(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:
MQDataExceptionjava.io.IOException
-
read
int read(java.io.DataInput message, int encoding, int characterSet) throws java.lang.Exception, MQDataException, java.io.IOExceptionReads 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)MQDataExceptionjava.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.IOExceptionWrites 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.
-
-