Class CommArea

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

extended bycom.microfocus.cics.client.CommArea

Class Specifications

public class CommArea

extends Object

Field Summary

static short COMM_AREA_SIZE

Max COMMAREA size

static String IBM037

IBM037 (EBCDIC)

static String IBM1047

IBM1047 (EBCDIC)

static String ISO_8859_1

ISO-8859-1

static short NO_COMM_AREA_BYTES

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

Constructor Summary

CommArea()

Construct a CommArea class

CommArea(byte[] commArea)

Construct a CommArea class

CommArea(byte[] commArea, String encoding)

Construct a CommArea class

CommArea(CommArea that)

Construct a CommArea class

CommArea(String commArea)

Construct a CommArea class

CommArea(String commArea, String encoding)

Construct a CommArea class

Methods

Method Summary
boolean equals(Object obj)
byte[] getCommArea()
byte[] getCommAreaAsAscii()
short getLength()
int hashCode()
void printCommAreaAsByteArray()

Print the commArea as a byteArray

void printCommAreaAsString()

Print the commArea as a String

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

Field Detail

COMM_AREA_SIZE
public static final short COMM_AREA_SIZE

Max COMMAREA size

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
NO_COMM_AREA_BYTES
public static final short NO_COMM_AREA_BYTES

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

See Also:
Constant Field Values

Constructor Detail

CommArea
public CommArea()

Construct a CommArea class

CommArea
public CommArea(byte[] commArea)
               throws CommAreaSizeException 

Construct a CommArea class

Parameters:
commArea CommArea passed in as a bytearray
Throws:
CommAreaSizeException
CommArea
public CommArea(byte[] commArea), 
						   String encoding)
         throws CommAreaSizeException,
                UnsupportedEncodingException 
Parameters:
commArea CommArea passed in as a bytearray
encoding Charset encoding for the CommArea
Throws:
See Also:
Charset
CommArea
CommArea(CommArea that)
CommArea
public CommArea(String commArea) 
         throws CommAreaSizeException,
                UnsupportedEncodingException  
Parameters:
commArea CommArea passed in as a bytearray
Throws:
CommArea
CommArea(String commArea, 
						String encoding)
         throws UnsupportedEncodingException,
                CommAreaSizeException
Parameters:
commArea CommArea passed in as a bytearray
encoding Charset encoding for the CommArea
Throws:
See Also:
Charset

Method Detail

getCommArea
public byte[] getCommArea()
Returns:
The commArea as a byteArray
getCommAreaAsAscii
public byte[] getCommAreaAsAscii()
     throws UnsupportedEncodingException
Returns:
The commArea in ASCII
Throws:
UnsupportedEncodingException
getLength
public short getLength()
Returns:
Length of CommArea. NO_COMM_AREA_BYTES if bytearray is null
printCommAreaAsByteArray
public void printCommAreaAsByteArray()

Print the commArea as a byteArray

printCommAreaAsString
public void printCommAreaAsString()

Print the commArea as a String

setCommArea
public void setCommArea(byte[] commArea)
     throws CommAreaSizeException
Parameters:
commArea The commArea as a bytearray
Throws:
CommAreaSizeException
equals
public boolean equals(Object obj)
Overrides:
equals in class Object
hashCode
public int hashCode()
Overrides:
hashCode in class Object