|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.ei.channel.codec.DPTPCodec
This class converts DataPackets or Vectors of DataPackets to/from a compact XML representation. The aim of this class is to define a standard means of representing a DataPacket as a String. Secondly the class is designed to be lightweight and fast, therefore this class does all the xml encoding and decoding itself, it does not rely on third party XML packages such as Xerces or JAXP. This class is not as robust as fully fledged XML parsers, it can only handle the defined DataPacket xml reprensentation and it cannot handle xml strings that are not well formed.
Field Summary | |
static java.lang.String |
CLOSE_TAG_BEGIN
|
static java.lang.String |
CLOSE_TAG_END
|
static java.lang.String |
DATAPACKET_END_TAG
|
static java.lang.String |
DATAPACKET_ENTITY
|
static java.lang.String |
DATAPACKET_START_TAG
|
static java.lang.String |
GT_TOKEN
|
static java.lang.String |
LT_TOKEN
|
static java.lang.String |
NAME_TOKEN
|
static java.lang.String |
OPEN_TAG_BEGIN
|
static java.lang.String |
OPEN_TAG_END
|
static java.lang.String |
OPEN_TAG_MIDDLE
|
static java.lang.String |
ROOT_NODE_NAME
|
static java.lang.String |
VALUE_END_TAG
|
static java.lang.String |
VALUE_ENTITY
|
static java.lang.String |
VALUE_START_TAG
|
static java.lang.String |
VECTOR_END_TAG
|
static java.lang.String |
VECTOR_ENTITY
|
static java.lang.String |
VECTOR_START_TAG
|
static java.lang.String |
XML_PI
|
Constructor Summary | |
DPTPCodec()
DataPacketCodec constructor comment. |
Method Summary | |
java.util.Vector |
decode(java.lang.String encoded)
This method converts a xml DataPacket representation into a Vector of one or more DataPackets |
java.lang.String |
encode(java.util.Vector dataPackets)
This method encodes one or more DataPackets into a compact xml reprensentation |
java.lang.String |
getName()
Return the name of this codec. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NAME_TOKEN
public static final java.lang.String OPEN_TAG_BEGIN
public static final java.lang.String OPEN_TAG_MIDDLE
public static final java.lang.String OPEN_TAG_END
public static final java.lang.String CLOSE_TAG_BEGIN
public static final java.lang.String CLOSE_TAG_END
public static final java.lang.String VECTOR_ENTITY
public static final java.lang.String DATAPACKET_ENTITY
public static final java.lang.String VALUE_ENTITY
public static final java.lang.String VALUE_START_TAG
public static final java.lang.String VALUE_END_TAG
public static final java.lang.String VECTOR_START_TAG
public static final java.lang.String VECTOR_END_TAG
public static final java.lang.String DATAPACKET_START_TAG
public static final java.lang.String DATAPACKET_END_TAG
public static final java.lang.String ROOT_NODE_NAME
public static final java.lang.String XML_PI
public static final java.lang.String LT_TOKEN
public static final java.lang.String GT_TOKEN
Constructor Detail |
public DPTPCodec()
Method Detail |
public java.util.Vector decode(java.lang.String encoded)
decode
in interface Codec
encoded
- String containing the xml reprensentation
public java.lang.String encode(java.util.Vector dataPackets)
encode
in interface Codec
dataPackets
- Vector of DataPackets
public java.lang.String getName()
getName
in interface Codec
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |