com.bankframe.ei.channel.codec
Class JOTPCodec

java.lang.Object
  extended by com.bankframe.ei.channel.codec.JOTPCodec
All Implemented Interfaces:
Codec

public class JOTPCodec
extends Object
implements Codec

This class converts Vectors of DataPackets to a hexadecimal string representation. This is string representaion can be used to transport the DataPacket over a typical HTTP connection.


Constructor Summary
JOTPCodec()
          Default Constructor
 
Method Summary
 Vector decode(String hexString)
          This method decodes an encoded string to a vector of DataPackets
 String encode(Vector ser)
          This method encodes a Vector of DataPackets as a string.
 String getName()
          Return the name of this codec.
 Serializable hexToSerializable(String hexString)
           
 String serializableToHex(Serializable ser)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOTPCodec

public JOTPCodec()
Default Constructor

Method Detail

decode

public Vector decode(String hexString)
This method decodes an encoded string to a vector of DataPackets

Specified by:
decode in interface Codec
Parameters:
hexString - the encoded string
Returns:
a vector of DataPackets

encode

public String encode(Vector ser)
Description copied from interface: Codec
This method encodes a Vector of DataPackets as a string.

Specified by:
encode in interface Codec
Parameters:
ser - Vector an encoded string

getName

public String getName()
Return the name of this codec.

Specified by:
getName in interface Codec
Returns:
java.lang.String

hexToSerializable

public Serializable hexToSerializable(String hexString)
                               throws IOException,
                                      ClassNotFoundException
Throws:
IOException
ClassNotFoundException

serializableToHex

public String serializableToHex(Serializable ser)
                         throws IOException
Throws:
IOException


Copyright © 2005, 2007, Oracle. All rights reserved.