public class MQRFH2 extends com.ibm.mq.headers.internal.Header implements MQChainable
| Modifier and Type | Class and Description |
|---|---|
static interface |
MQRFH2.Element
The Element interface to get and set values
|
MQHeader.Field| Constructor and Description |
|---|
MQRFH2()
Constructs an MQRFH2 instance with default field values.
|
MQRFH2(java.io.DataInput message)
Constructs an MQRFH2 instance populated from an MQMessage.
|
MQRFH2(java.io.DataInput message,
int encoding,
int characterSet)
Constructs an MQRFH2 instance populated from a DataInput source.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format() |
boolean |
getBooleanFieldValue(java.lang.String folder,
java.lang.String field)
Get the boolean value of the specified field
|
byte |
getByteFieldValue(java.lang.String folder,
java.lang.String field)
Get the byte value of the specified field
|
byte[] |
getBytesFieldValue(java.lang.String folder,
java.lang.String field)
Get the byte array value of the specified field
|
char |
getCharFieldValue(java.lang.String folder,
java.lang.String field)
Get the byte value of the specified field
|
int |
getCodedCharSetId()
Get the Character set identifier of data that follows.
|
double |
getDoubleFieldValue(java.lang.String folder,
java.lang.String field)
Get the double precision floating point value of the specified field
|
int |
getEncoding()
Get the numeric encoding of the data that follows.
|
java.lang.Object |
getFieldValue(java.lang.String folder,
java.lang.String tag) |
java.lang.Object |
getFieldValue(java.lang.String folder,
java.lang.String field,
int occurrenceP) |
java.util.List |
getFieldValues(java.lang.String folder,
java.lang.String field) |
int |
getFlags()
get the flags from the header
|
float |
getFloatFieldValue(java.lang.String folder,
java.lang.String field)
Get the floating point value of the specified field
|
java.lang.String |
getFolderContent(java.lang.String name)
Deprecated.
|
java.lang.String[] |
getFolderStrings() |
java.lang.String |
getFormat()
Get the format name of data that follows NameValueString
|
int |
getIntFieldValue(java.lang.String folder,
java.lang.String field)
Get the integer value of the specified field
|
long |
getLongFieldValue(java.lang.String folder,
java.lang.String field)
Get the long value of the specified field
|
int |
getNameValueCCSID()
get the coded character set for the NameValue data
|
byte[] |
getNameValueData()
get the NameValue data
|
int |
getNameValueLength() |
short |
getShortFieldValue(java.lang.String folder,
java.lang.String field)
Get the short value of the specified field
|
java.lang.String |
getStringFieldValue(java.lang.String folder,
java.lang.String field)
Get the String value of the specified field
|
java.lang.String |
getStrucId()
Get the structure identifier; the value will be MQRFH_STRUC_ID
|
int |
getStrucLength()
Get the length of the structure.
|
int |
getVersion()
Get the Structure version number
|
int |
nextCharacterSet() |
void |
nextCharacterSet(int value)
Sets the CCSID of the next header or message content.
|
int |
nextEncoding() |
void |
nextEncoding(int value)
Sets the numeric encoding of the next header or message content.
|
java.lang.String |
nextFormat() |
void |
nextFormat(java.lang.String value)
Sets the format of the next header or message content.
|
int |
read(java.io.DataInput input,
int encoding,
int characterSet)
Initialise this Header from the specified data source
|
void |
setByteFieldValue(java.lang.String folder,
java.lang.String field,
byte value)
Set the byte value of the specified field
|
void |
setCharFieldValue(java.lang.String folder,
java.lang.String field,
char value)
Set the short value of the specified field
|
void |
setCodedCharSetId(int value)
Set the Character set identifier of data that follows.
|
void |
setDoubleFieldValue(java.lang.String folder,
java.lang.String field,
double value)
Set the double precision floating point value of the specified field
|
void |
setEncoding(int value)
Set the numeric encoding of the data that follows.
|
void |
setFieldValue(java.lang.String folder,
java.lang.String field,
java.lang.Object value)
set value of a field
|
void |
setFieldValues(java.lang.String folder,
java.lang.String field,
java.util.List values)
set the values of a multi-valued field
|
void |
setFlags(int value)
set the flags on the header
|
void |
setFloatFieldValue(java.lang.String folder,
java.lang.String field,
float value)
Set the floating point value of the specified field
|
void |
setFolderContent(java.lang.String name,
java.lang.String content)
Deprecated.
|
void |
setFolderStrings(java.lang.String[] folders)
Replaces content of the variable part of the MQRFH2 structure with the specified array of
strings.
|
void |
setFormat(java.lang.String value)
Set the format name of data that follows NameValueString
|
void |
setIntFieldValue(java.lang.String folder,
java.lang.String field,
int value)
Set the integer value of the specified field
|
void |
setLongFieldValue(java.lang.String folder,
java.lang.String field,
long value)
Set the long value of the specified field
|
void |
setNameValueCCSID(int value)
set the coded character set for the NameValue data
|
void |
setNameValueData(byte[] value)
Sets the NameValueData field.
|
void |
setNameValueData(java.lang.String value)
Sets the NameValueData field.
|
void |
setShortFieldValue(java.lang.String folder,
java.lang.String field,
short value)
Set the short value of the specified field
|
int |
size() |
java.lang.String |
toString() |
int |
write(java.io.DataOutput outputP,
int encoding,
int characterSet)
write this Header to the specified location
|
characterSet, encoding, fields, getBytesValue, getCharValue, getCharValue, getIntValue, getJmqiEnv, getStringValue, getValue, headerType, read, read, setBytesValue, setCharValue, setCharValue, setIntValue, setStringValue, setValue, store, store, type, validate, writepublic MQRFH2()
public MQRFH2(java.io.DataInput message)
throws MQDataException,
java.io.IOException
message - the message to readMQDataException - if the message content does not yield a valid MQRFH2 stucturejava.io.IOException - if there is a problem reading the message contentpublic MQRFH2(java.io.DataInput message,
int encoding,
int characterSet)
throws MQDataException,
java.io.IOException
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 messageMQDataException - if the message content does not yield a valid MQRFH2 stucturejava.io.IOException - if there is a problem reading the message contentpublic int read(java.io.DataInput input,
int encoding,
int characterSet)
throws java.io.IOException,
MQDataException
read in interface MQDataread in class com.ibm.mq.headers.internal.Headerinput - the data sourceencoding - the encoding mechanism for integer datacharacterSet - the CCSID applied to data in the sourcejava.io.IOExceptionMQDataExceptionpublic int write(java.io.DataOutput outputP,
int encoding,
int characterSet)
throws java.io.IOException
write in interface MQDatawrite in class com.ibm.mq.headers.internal.HeaderoutputP - the data locationencoding - the encoding mechanism for integer datacharacterSet - the CCSID applied to data in the data locationjava.io.IOExceptionpublic int size()
public int nextEncoding()
nextEncoding in interface MQChainableMQChainable.nextEncoding()public void nextEncoding(int value)
MQChainablenextEncoding in interface MQChainableMQChainable.nextEncoding(int)public int nextCharacterSet()
nextCharacterSet in interface MQChainableMQChainable.nextCharacterSet()public void nextCharacterSet(int value)
MQChainablenextCharacterSet in interface MQChainableMQChainable.nextCharacterSet(int)public java.lang.String nextFormat()
nextFormat in interface MQChainableMQChainable.nextFormat()public void nextFormat(java.lang.String value)
MQChainablenextFormat in interface MQChainableMQChainable.nextFormat(java.lang.String)public java.lang.String format()
format in interface MQChainableMQChainable.format()public java.lang.String getStrucId()
public int getVersion()
public int getStrucLength()
public int getEncoding()
public void setEncoding(int value)
value - the numeric encoding. A combination of MQENC_* values.public int getCodedCharSetId()
public void setCodedCharSetId(int value)
value - the Character set identifier.public java.lang.String getFormat()
public void setFormat(java.lang.String value)
value - the format namepublic int getFlags()
public void setFlags(int value)
value - the flagspublic int getNameValueCCSID()
public void setNameValueCCSID(int value)
value - the coded character set for the NameValue datapublic int getNameValueLength()
Note: There is no setNameValueLength method. Setting the NameValueData field causes the NameValueLength and StrucLength field values to be updated accordingly.
public byte[] getNameValueData()
public void setNameValueData(byte[] value)
value - public void setNameValueData(java.lang.String value)
throws java.io.IOException
value - java.io.IOExceptionpublic java.lang.String[] getFolderStrings()
throws java.io.IOException
java.io.IOExceptionpublic void setFolderStrings(java.lang.String[] folders)
throws java.io.IOException
folders - java.io.IOExceptionpublic java.lang.String getFolderContent(java.lang.String name)
throws java.io.IOException
name - java.io.IOExceptionpublic void setFolderContent(java.lang.String name,
java.lang.String content)
throws java.io.IOException
name - content - java.io.IOExceptionpublic java.lang.Object getFieldValue(java.lang.String folder,
java.lang.String tag)
throws java.io.IOException
folder - tag - java.io.IOExceptionpublic java.lang.Object getFieldValue(java.lang.String folder,
java.lang.String field,
int occurrenceP)
throws java.io.IOException
folder - field - occurrenceP - java.io.IOExceptionpublic java.util.List getFieldValues(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - field - java.io.IOExceptionpublic void setFieldValue(java.lang.String folder,
java.lang.String field,
java.lang.Object value)
throws java.io.IOException
folder - - the name of the folder containing the fieldfield - - the field namevalue - - the field valuejava.io.IOExceptionpublic void setFieldValues(java.lang.String folder,
java.lang.String field,
java.util.List values)
throws java.io.IOException
folder - - the name of the folder containing the fieldfield - - the field namevalues - - the field valuesjava.io.IOExceptionpublic boolean getBooleanFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic int getIntFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setIntFieldValue(java.lang.String folder,
java.lang.String field,
int value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic byte getByteFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setByteFieldValue(java.lang.String folder,
java.lang.String field,
byte value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic short getShortFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setShortFieldValue(java.lang.String folder,
java.lang.String field,
short value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic char getCharFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setCharFieldValue(java.lang.String folder,
java.lang.String field,
char value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic long getLongFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setLongFieldValue(java.lang.String folder,
java.lang.String field,
long value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic float getFloatFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setFloatFieldValue(java.lang.String folder,
java.lang.String field,
float value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic double getDoubleFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic void setDoubleFieldValue(java.lang.String folder,
java.lang.String field,
double value)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headervalue - the value to setjava.io.IOExceptionpublic byte[] getBytesFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic java.lang.String getStringFieldValue(java.lang.String folder,
java.lang.String field)
throws java.io.IOException
folder - the folder name in the Headerfield - the field name in the Headerjava.io.IOExceptionpublic java.lang.String toString()
toString in class com.ibm.mq.headers.internal.HeaderObject.toString()