Class ContainerData

Class for constructing ContainerData. Default encoding for ContainerData is ISO-8859-1.
java.lang.Object

extended bycom.microfocus.cics.client.ContainerData

Class Specifications

public class ContainerData

extends Object

Field Summary

static String IBM037

IBM037 (EBCDIC)

static String IBM1047

IBM1047 (EBCDIC)

static String ISO-8859-1

ISO-8859-1

static int NO_CONTAINER_DATA_BYTES

Constant value to indicate container data has not been set, or container data size is 0 (empty byteArray).

Constructor Summary

ContainerData

Construct a ContainerData class

ContainerData(byte[] containerData)

Construct a ContainerData class

ContainerData(byte[] containerData, String encoding)

Construct a ContainerData class

ContainerData(ContainerData that)

Construct a ContainerData class

ContainerData(String containerData)

Construct a ContainerData class

ContainerData(String containerData, String encoding)

Construct a ContainerData class

Methods

Method Summary
boolean equals(Object obj)
byte[] getContainerData()
byte[] getContainerDataAsAscii()
int getLength()
int hashCode()
void printContainerDataAsByteArray()

Print the container data as a byte array

void printContainerDataAsString()

Print the container data as a string

void setContainerData(byte[] containerData)
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait

Field Detail

NO_CONTAINER_DATA_BYTES
public static final int NO_CONTAINER_DATA_BYTES

Constant value to indicate container data has not been set, or container data size is 0 (empty byteArray).

See Also:
Constant Field Values
IBM037
public static final String IBM037

IBM037 (EBCDIC)

See Also:
Constant Field Values
IBM1047
public static final String IBM01047

IBM1047 (EBCDIC)

See Also:
Constant Field Values
ISO_8859_1
public static final String ISO_8859_1

ISO_8859_1

See Also:
Constant Field Values

Constructor Detail

ContainerData
public ContainerData()

Construct a ContainerData class

ContainerData
public ContainerData(ContainerData that)
ContainerData
public ContainerData(String containerData)
Parameters:
containerData Container data passed as a string
ContainerData
public ContainerData(byte[] containerData)
Parameters:
containerData Container data passed as a byte array
ContainerData
public ContainerData(byte[] containerData,
                     String encoding)
                     throws UnsupportedEncodingException
Parameters:
containerData Container data passed as a byte array
encoding Character encoding for the container data
Throws:
UnsupportedEncodingException
See Also:
Charset
ContainerData
public ContainerData(String containerData,
                     String encoding) 
              throws UnsupportedEncodingException 
Parameters:
containerData Container data passed as a byte array
encoding Character set encoding for the container data
Throws:
UnsupportedEncodingException
See Also:
Charset

Method Detail

getLength
public int getLength()
Returns:
Length of ContainerData, or NO_CONTAINER_DATA_BYTES if byte array is null.
setContainerData
public void setContainerData(byte[] containerData)
Parameters:
containerData The container data as a byte array
getContainerData
public byte[] getContainerData()
Returns:
The container data as a byte array
getContainerDataAsAscii
public byte[] getContainerDataAsAscii()
       throws UnsupportedEncodingException
Returns:
The container data in ASCII
Throws:
UnsupportedEncodingException
printContainerDataAsByteArray
public void printContainerDataAsByteArray()

Print the container data as a byte array

printContainerDataAsString
public void printContainerDataAsString()

Print the container data as a string

equals
public boolean equals(Object obj)
Overrides:
equals in class Object
hashCode
public int hashCode()
Overrides:
hashCode in class Object