Package com.ibm.mq.headers.pcf
Class MQCFBS
java.lang.Object
com.ibm.mq.jmqi.JmqiObject
com.ibm.mq.headers.internal.Header
com.ibm.mq.headers.pcf.PCFHeader
com.ibm.mq.headers.pcf.PCFParameter
com.ibm.mq.headers.pcf.MQCFBS
MQCFBS (PCF byte string parameter) header class.
struct tagMQCFBS {
MQLONG Type; // Structure type
MQLONG StrucLength; // Structure length
MQLONG Parameter; // Parameter identifier
MQLONG StringLength; // Length of string
MQBYTE String[1]; // String value -- first byte
};
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.ibm.mq.headers.MQHeader
MQHeader.Field -
Field Summary
Fields inherited from class com.ibm.mq.headers.internal.Header
DEFAULT_CCSID, DEFAULT_ENCODING, delegateFields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO -
Constructor Summary
ConstructorsConstructorDescriptionMQCFBS()Constructs an MQCFBS instance with default field values.MQCFBS(int parameter, byte[] bytes) Initializes an MQCFBS with the specified values.Initializes an MQCFBS with the specified values.Constructs an MQCFBS instance populated from an MQMessage.Constructs an MQCFBS instance populated from a DataInput source. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true when invoked with another MQCFBS instance with the same parameter and equivalent value.intgets the version number of the header formatintgets the parameter identifierbyte[]gets the stringintgets the length of the stringgets the parameter value as a StringintGets the length of the structure.intgetType()gets the structure typegetValue()gets the parameter valueinthashCode()Returns a hash code value for the objectvoidsetParameter(int value) sets the parameter identifiervoidsetString(byte[] value) sets the stringMethods inherited from class com.ibm.mq.headers.pcf.PCFParameter
getParameterName, nextParameterMethods inherited from class com.ibm.mq.headers.internal.Header
characterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, size, store, store, toString, type, validate, write, writeMethods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Constructor Details
-
MQCFBS
public MQCFBS()Constructs an MQCFBS instance with default field values. -
MQCFBS
Constructs an MQCFBS instance populated from an MQMessage.- Parameters:
message- the message to read- Throws:
MQDataException- if the message content does not yield a valid MQCFBS stuctureIOException- if there is a problem reading the message content
-
MQCFBS
public MQCFBS(DataInput message, int encoding, int characterSet) throws MQDataException, IOException Constructs an MQCFBS instance populated from a DataInput source.- Parameters:
message- the MQMessage or other DataInput source to readencoding- the initial numeric encoding of the data in the messagecharacterSet- the initial CCSID of the data in the message- Throws:
MQDataException- if the message content does not yield a valid MQCFBS stuctureIOException- if there is a problem reading the message content
-
MQCFBS
Initializes an MQCFBS with the specified values. The string is converted into a byte array value using the platform's default string-to-bytes conversion.- Parameters:
parameter- the parameter identifierstring- the string parameter value
-
MQCFBS
public MQCFBS(int parameter, byte[] bytes) Initializes an MQCFBS with the specified values.- Parameters:
parameter- the parameter identifierbytes- the binary parameter value
-
-
Method Details
-
equals
Returns true when invoked with another MQCFBS instance with the same parameter and equivalent value. Comparison of the values is performed using the java.util.Arrays.equals method.- Overrides:
equalsin classPCFParameter- Parameters:
obj- An object to compare with this instance- Returns:
- true of the object equals this one
-
hashCode
public int hashCode()Description copied from class:PCFParameterReturns a hash code value for the object- Specified by:
hashCodein classPCFParameter- Returns:
- a hash code value for this object.
- See Also:
-
getType
public int getType()gets the structure type -
getStrucLength
public int getStrucLength()Gets the length of the structure.- Returns:
- the structure length.
-
getParameter
public int getParameter()gets the parameter identifier- Specified by:
getParameterin classPCFParameter- Returns:
- the parameter identifier
-
setParameter
public void setParameter(int value) sets the parameter identifier- Parameters:
value- the parameter identifier
-
getStringLength
public int getStringLength()gets the length of the string- Returns:
- the parameter identifier
-
getString
public byte[] getString()gets the string- Returns:
- the string
-
setString
public void setString(byte[] value) sets the string- Parameters:
value- the string
-
getValue
Description copied from class:PCFParametergets the parameter value- Specified by:
getValuein classPCFParameter- Returns:
- the parameter value
- See Also:
-
getStringValue
Description copied from class:PCFParametergets the parameter value as a String- Specified by:
getStringValuein classPCFParameter- Returns:
- the parameter value as a String
- See Also:
-
getHeaderVersion
public int getHeaderVersion()Description copied from class:PCFParametergets the version number of the header format- Overrides:
getHeaderVersionin classPCFParameter- Returns:
- the version number of the header format
- See Also:
-