IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.cs.servlet
Class CSDataSender

java.lang.Object
  extended by com.ibm.btt.cs.servlet.CSDataSender

public class CSDataSender
extends java.lang.Object

The CSDataSender class encapsulates the sending or retrieving of data.


Field Summary
protected  java.lang.String charEncoding
          Character encoding used in the HTTP message body sent in C/S requests.
(package private)  java.io.DataInputStream inStream
           
(package private)  java.util.Hashtable myDict
           
(package private)  java.io.DataOutputStream outStream
           
 
Constructor Summary
CSDataSender()
           
 
Method Summary
 void beginReceive(java.io.DataInputStream in, int size)
          Initializes receiving data.
 void beginReceive(java.io.DataInputStream in, int size, java.lang.String charEncod)
          Initializes receiving data.
 void beginSend(java.io.DataOutputStream out, int number)
          Initializes sending data.
 void endReceive()
          Finalizes receiving data.
 void endSend()
          Finalizes sending data.
 byte[] getBytes(java.lang.String aString, java.lang.String charEncod)
          Convert this String into bytes according to the char encoding.
 byte[] getBytesUTF8(java.lang.String aString)
          Convert this String into bytes according to the UTF8 encoding.
 java.lang.String getCharEncoding()
          Obtains the charEncoding attribute.
 byte[] receiveBytes(java.lang.String name)
          Enables receiving bytes.
 java.lang.Integer receiveInteger(java.lang.String name)
          Receives integers.
 java.lang.Long receiveLong(java.lang.String name)
          Receives Longs.
 java.lang.String receiveString(java.lang.String name)
          Receives Strings.
 void sendBytes(byte[] name, byte[] data)
          Sends bytes.
 void sendInteger(byte[] name, java.lang.Integer data)
          Sends integers.
 void sendInteger(byte[] name, java.lang.Integer data, java.lang.String charEncod)
          Sends integers.
 void sendLong(byte[] name, java.lang.Long data)
          Sends Longs.
 void sendLong(byte[] name, java.lang.Long data, java.lang.String charEncod)
          Sends Longs.
 void sendString(byte[] name, byte[] data)
          Sends Strings.
 void sendString(byte[] name, byte[] data, java.lang.String charEncod)
          Sends Strings.
 void setCharEncoding(java.lang.String c)
          Sets the charEncoding attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

charEncoding

protected java.lang.String charEncoding
Character encoding used in the HTTP message body sent in C/S requests.


outStream

java.io.DataOutputStream outStream

inStream

java.io.DataInputStream inStream

myDict

java.util.Hashtable myDict
Constructor Detail

CSDataSender

public CSDataSender()
Method Detail

beginReceive

public void beginReceive(java.io.DataInputStream in,
                         int size)
                  throws java.lang.Exception
Initializes receiving data.

Parameters:
in - java.io.DataInputStream
size - int
Throws:
java.lang.Exception

beginReceive

public void beginReceive(java.io.DataInputStream in,
                         int size,
                         java.lang.String charEncod)
                  throws java.lang.Exception
Initializes receiving data.

Parameters:
in - java.io.DataInputStream
size - int
charEncod - String
Throws:
java.lang.Exception

beginSend

public void beginSend(java.io.DataOutputStream out,
                      int number)
               throws java.io.IOException
Initializes sending data.

Parameters:
out - java.io.DataOutputStream
number - int
Throws:
java.io.IOException

endReceive

public void endReceive()
                throws java.io.IOException
Finalizes receiving data.

Throws:
java.io.IOException

endSend

public void endSend()
             throws java.io.IOException
Finalizes sending data.

Throws:
java.io.IOException

getBytesUTF8

public byte[] getBytesUTF8(java.lang.String aString)
                    throws java.lang.Exception
Convert this String into bytes according to the UTF8 encoding.

Parameters:
aString - String
Returns:
byte[]
Throws:
java.lang.Exception

receiveBytes

public byte[] receiveBytes(java.lang.String name)
                    throws java.io.IOException
Enables receiving bytes.

Parameters:
name - String
Returns:
byte[]
Throws:
java.io.IOException

receiveInteger

public java.lang.Integer receiveInteger(java.lang.String name)
                                 throws java.io.IOException
Receives integers.

Parameters:
name - String
Returns:
Integer
Throws:
java.io.IOException

receiveLong

public java.lang.Long receiveLong(java.lang.String name)
                           throws java.io.IOException
Receives Longs.

Parameters:
name - String
Returns:
Long
Throws:
java.io.IOException

receiveString

public java.lang.String receiveString(java.lang.String name)
                               throws java.io.IOException
Receives Strings.

Parameters:
name - String
Returns:
String
Throws:
java.io.IOException

sendBytes

public void sendBytes(byte[] name,
                      byte[] data)
               throws java.lang.Exception
Sends bytes.

Parameters:
name - byte[]
data - byte[]
Throws:
java.lang.Exception

sendInteger

public void sendInteger(byte[] name,
                        java.lang.Integer data)
                 throws java.lang.Exception
Sends integers.

Parameters:
name - byte[]
data - Integer
Throws:
java.lang.Exception

sendLong

public void sendLong(byte[] name,
                     java.lang.Long data)
              throws java.lang.Exception
Sends Longs.

Parameters:
name - byte[]
data - Long
Throws:
java.lang.Exception

sendString

public void sendString(byte[] name,
                       byte[] data)
                throws java.lang.Exception
Sends Strings.

Parameters:
name - byte[]
data - byte[]
Throws:
java.lang.Exception

getCharEncoding

public java.lang.String getCharEncoding()
Obtains the charEncoding attribute.

Returns:
String

setCharEncoding

public void setCharEncoding(java.lang.String c)
Sets the charEncoding attribute.

Parameters:
c - String

getBytes

public byte[] getBytes(java.lang.String aString,
                       java.lang.String charEncod)
                throws java.lang.Exception
Convert this String into bytes according to the char encoding.

Parameters:
aString - String
charEncod - String
Returns:
byte[]
Throws:
java.lang.Exception

sendString

public void sendString(byte[] name,
                       byte[] data,
                       java.lang.String charEncod)
                throws java.lang.Exception
Sends Strings.

Parameters:
name - byte[]
data - byte[]
charEncod - String
Throws:
java.lang.Exception

sendLong

public void sendLong(byte[] name,
                     java.lang.Long data,
                     java.lang.String charEncod)
              throws java.lang.Exception
Sends Longs.

Parameters:
name - byte[]
data - Long
charEncod - String
Throws:
java.lang.Exception

sendInteger

public void sendInteger(byte[] name,
                        java.lang.Integer data,
                        java.lang.String charEncod)
                 throws java.lang.Exception
Sends integers.

Parameters:
name - byte[]
data - Integer
charEncod - String
Throws:
java.lang.Exception

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011