public class Container extends API
This is the Java implementation of CICS Containers.
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
Modifier and Type | Field and Description |
---|---|
static int |
DATATYPE_BIT
Constant for BIT type containers
|
static int |
DATATYPE_CHAR
Constant for CHAR type containers
|
static int |
NOTSET
Constant for state that has yet been set
|
Modifier and Type | Method and Description |
---|---|
void |
append(byte[] byteArrayData)
Appends a byte[] to the end of the data in the Container.
|
void |
append(byte[] byteArrayData,
java.lang.String fromCodePage)
Appends a byte[] to the end of the data in the Container.
|
void |
appendString(java.lang.String stringData)
Appends a String to the end of the data in the Container.
|
void |
delete()
Delete the Container in CICS, and remove it from the
owning Channel.
|
byte[] |
get()
Get the data from the Container.
|
byte[] |
get(int offset,
int length)
Get a specified length of data from the Container at the given offset
|
byte[] |
get(java.lang.String intoCodePage)
Get the data from the Container.
|
byte[] |
get(java.lang.String intoCodePage,
int offset,
int length)
Get a specified length of data from the Container at the given offset
|
int |
getCCSID()
Get the CCSID value of the data returned by getNoConvert().
|
int |
getDatatype()
Get the datatype of this container.
|
int |
getLength()
Get the length of the data in the Container.
|
int |
getLength(java.lang.String intoCodePage)
Get the length of the data in the Container.
|
int |
getLengthNoConvert()
Get the length of the data in the Container without conversion.
|
java.lang.String |
getName()
Get the name of the Container as known to CICS.
|
byte[] |
getNoConvert()
Get the data from the Container without conversion.
|
byte[] |
getNoConvert(int offset,
int length)
Get a specified length of data from the Container at the given offset without codepage conversion
|
java.lang.String |
getString()
Get the data from a CICS Container and return it as a String.
|
void |
put(byte[] byteArrayData)
Puts byte[] array data into the Container.
|
void |
put(byte[] byteArrayData,
java.lang.String fromCodePage)
Puts byte[] array data into the Container.
|
void |
put(java.lang.String stringData)
Deprecated.
This method exhibits unexpected behaviour by creating a container of type BIT. A container of type CHAR would
be the more logical behaviour for String data. See putString(String) for a replacement of this method.
|
void |
putString(java.lang.String stringData)
Puts String data into the Container.
|
public static final int NOTSET
public static final int DATATYPE_BIT
public static final int DATATYPE_CHAR
public java.lang.String getName()
public java.lang.String getString() throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic byte[] get() throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic byte[] get(java.lang.String intoCodePage) throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
intoCodePage
- is the code-page in which the container data will be returnedContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic byte[] get(java.lang.String intoCodePage, int offset, int length) throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
intoCodePage
- the code-page in which the container data will be returnedoffset
- start of the data (offset in bytes, 0 indexed). If negative, 0 is assumedlength
- length of data to retrieve starting at offsetContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic byte[] getNoConvert() throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic byte[] getNoConvert(int offset, int length) throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
offset
- start of the data (offset in bytes, 0 indexed). If negative, 0 is assumedlength
- length of data to retrieve starting at offsetContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic byte[] get(int offset, int length) throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
offset
- start of the data (offset in bytes, 1 indexed). If negative, 0 is assumedlength
- length of data to retrieve starting at offsetContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic int getLength() throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic int getLength(java.lang.String intoCodePage) throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
intoCodePage
- is the code-page into which the container data will be converted when retrieved from the container.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic int getLengthNoConvert() throws ContainerErrorException, ChannelErrorException, CCSIDErrorException, CodePageErrorException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic int getCCSID()
public int getDatatype() throws ContainerErrorException, ChannelErrorException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRpublic void append(byte[] byteArrayData) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
byteArrayData
- data to be appended to the existing data in the Container.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic void put(byte[] byteArrayData) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
byteArrayData
- data to be put into the Container.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic void append(byte[] byteArrayData, java.lang.String fromCodePage) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
byteArrayData
- data to be appended to the existing data in the Container.fromCodePage
- is the code-page in which the byteArrayData is encoded.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic void put(byte[] byteArrayData, java.lang.String fromCodePage) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
byteArrayData
- data to be put into the Container.fromCodePage
- is the code-page in which the byteArrayData is encoded.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic void appendString(java.lang.String stringData) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
stringData
- data to be put into the Container.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERR@Deprecated public void put(java.lang.String stringData) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
stringData
- data to be put into the Container.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic void putString(java.lang.String stringData) throws ContainerErrorException, ChannelErrorException, InvalidRequestException, CCSIDErrorException, CodePageErrorException
stringData
- data to be put into the Container.ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQCCSIDErrorException
- CCSIDERRCodePageErrorException
- CODEPAGEERRpublic void delete() throws ContainerErrorException, ChannelErrorException, InvalidRequestException
ContainerErrorException
- CONTAINERERRChannelErrorException
- CHANNELERRInvalidRequestException
- INVREQ