|
SecurePlayLibray J2SE v2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.SecurePlay.SPUxml.SPUxml
This utility class is used to serialize SPAbstractMessageClasses to an XML Message document, and deserialize an XML Message document to a SPMessageClass
![]() |
![]() |
![]() |
![]() |
| Field Summary | |
private static java.lang.StringBuffer |
accumulator
StringBuffer used for storing values from XML elements temporarily |
private static boolean |
encryptedflag
Encrypted flag filled by deserialize() and used to create a SPMessageClass |
(package private) java.lang.String |
extendedversion
Developer extended version. |
private static java.lang.String |
gid
Game ID filled by deserialize() and used to create a SPMessageClass |
private static java.lang.String[] |
messagebody
String array of message body filled by deserialize() and used to create a SPMessageClass |
private static java.lang.String |
messid
Message ID filled by deserialize() and used to create a SPMessageClass |
private static java.lang.String |
messtype
Message type filled by deserialize() and used to create a SPMessageClass |
private static SPMessageClass[] |
multiincoming
This property is used for multiple message storage to be handled by deserialize methods |
private static SPUEPrivatePolicy |
privateflag
Privacy Policy filled by deserialize() and used to create a SPMessageClass |
private static java.lang.String[] |
recievers
String array of recievers of the message filled by deserialize() and used to create a SPMessageClass |
(package private) java.lang.String |
releaseversion
IT GlobalSecure release version. |
private static java.lang.String |
senderid
Sender ID filled by deserialize() and used to create a SPMessageClass |
private static byte[] |
signature
Signature filled by deserialize() and used to create a SPMessageClass |
private static boolean |
signedflag
Signed flag by deserialize() and used to create a SPMessageClass |
private static java.lang.String |
tid
Transaction ID filled by deserialize() and used to create a SPMessageClass |
| Constructor Summary | |
SPUxml()
|
|
| Method Summary | |
void |
characters(char[] buffer,
int start,
int length)
Overridden Method from org.xml.sax.HandlerBase Class When the parser encounters plain text (not XML elements), it calls this method, which accumulates them in a string buffer |
void |
endElement(java.lang.String name)
Overridden Method from org.xml.sax.HandlerBase Class When the parser encounters the end of an element, it calls this method |
void |
error(org.xml.sax.SAXParseException exception)
This method is called when errors occur |
void |
fatalError(org.xml.sax.SAXParseException exception)
This method is called when non-recoverable errors occur. |
static void |
resetmess()
|
static java.lang.String[] |
serializeMessages(SPMessageClass[] messages)
This method serializes only multiple SPMessageClass (es) |
static java.lang.String[] |
serializeOneMessage(SPMessageClass mess)
This method serializes only one SPMessageClass into an XML document and gives you the option to include the DTD (called by the above wrapper methods multiple to serialize multiple or just one) |
void |
startElement(java.lang.String name,
org.xml.sax.Attributes attributes)
Overridden Method from org.xml.sax.HandlerBase Class Every time the parser encounters the beginning of a new element, it calls this method, which resets the string buffer |
void |
warning(org.xml.sax.SAXParseException exception)
This method is called when warnings occur |
static java.lang.String[] |
XMLaddDTD()
This method returns the DTD for the XML message document. |
static SPMessageClass[] |
XMLdeserializeBufferedReader(java.io.BufferedReader buffreader,
boolean DTDcheck)
This method deserializes XML documents into SPABstractMessageClasses from a BufferedReader. |
static SPMessageClass[] |
XMLdeserializeFile(java.lang.String filename)
This method deserializes an XML document to SPAbstractMessageClasses, using the specified file name. |
static SPMessageClass[] |
XMLdeserializeFile(java.lang.String filename,
boolean DTDcheck)
This method deserializes an XML document to SPAbstractMessageClasses, using the specified file name, and gives you the option of checking the DTD. |
static SPMessageClass[] |
XMLdeserializeString(java.lang.String str)
This method deserializes an XML document to SPAbstractMessageClasses, from a string. |
static SPMessageClass[] |
XMLdeserializeString(java.lang.String str,
boolean DTDcheck)
This method deserializes an XML document to SPAbstractMessageClasses, from a string, and gives you the option of checking the DTD. |
static java.lang.String[] |
XMLserialize(SPMessageClass mess)
This method serializes only one SPMessageClass into an XML document and does not include the DTD. |
static java.lang.String[] |
XMLserialize(SPMessageClass[] messages)
This method serializes only multiple SPMessageClass into an XML document and does not include the DTD. |
static java.lang.String[] |
XMLserialize(SPMessageClass[] messages,
boolean includeDTD)
This method serializes only multiple SPMessageClass into an XML document and gives you the option to include the DTD. |
static java.lang.String[] |
XMLserialize(SPMessageClass mess,
boolean includeDTD)
This method serializes only one SPMessageClass into an XML document and gives you the option to include the DTD. |
static java.lang.String[] |
XMLserializefooter()
This method serializes the message package footer |
static java.lang.String[] |
XMLserializeheader(boolean includeDTD)
This method serializes the message header with our without the DTD |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static java.lang.StringBuffer accumulator
private static java.lang.String gid
private static java.lang.String tid
private static java.lang.String senderid
private static java.lang.String[] recievers
private static java.lang.String messtype
private static boolean signedflag
private static boolean encryptedflag
private static SPUEPrivatePolicy privateflag
private static java.lang.String[] messagebody
private static byte[] signature
private static java.lang.String messid
final java.lang.String extendedversion
final java.lang.String releaseversion
private static SPMessageClass[] multiincoming
| Constructor Detail |
public SPUxml()
| Method Detail |
public static java.lang.String[] XMLaddDTD()
public static java.lang.String[] XMLserialize(SPMessageClass mess)
mess - SPMessageClass - the message to be serialized
public static java.lang.String[] XMLserialize(SPMessageClass mess,
boolean includeDTD)
mess - SPMessageClass - the message to be serializedincludeDTD - boolean - True, includes the DTD; False, does not include the DTD
public static java.lang.String[] XMLserialize(SPMessageClass[] messages)
messages - SPMessageClass[] - the messagees to be serialized
public static java.lang.String[] XMLserialize(SPMessageClass[] messages,
boolean includeDTD)
messages - SPMessageClass[] - the messages to be serializedincludeDTD - boolean - True, includes the DTD; False, does not include the DTD
public static java.lang.String[] serializeOneMessage(SPMessageClass mess)
mess - SPMessageClass - the message to be serialized
public static SPMessageClass[] XMLdeserializeString(java.lang.String str)
str - String - the string that contains the serialized messages.
public static SPMessageClass[] XMLdeserializeFile(java.lang.String filename)
filename - String - name of the file to be deserialized.
public static SPMessageClass[] XMLdeserializeString(java.lang.String str,
boolean DTDcheck)
str - String - the string that contains the serialized messages.DTDcheck - boolean - True, check the DTD; False, does not check the DTD
public static SPMessageClass[] XMLdeserializeFile(java.lang.String filename,
boolean DTDcheck)
filename - String - name of the file to be deserialized.DTDcheck - boolean - True, check the DTD; False, does not check the DTD
public static SPMessageClass[] XMLdeserializeBufferedReader(java.io.BufferedReader buffreader,
boolean DTDcheck)
buffreader - BufferedReader - the reader from which the XML documents are buffered in.DTDcheck - boolean - True, check the DTD; False, does not check the DTD
public void characters(char[] buffer,
int start,
int length)
public void startElement(java.lang.String name,
org.xml.sax.Attributes attributes)
public void endElement(java.lang.String name)
public void warning(org.xml.sax.SAXParseException exception)
public void error(org.xml.sax.SAXParseException exception)
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic static void resetmess()
public static java.lang.String[] XMLserializeheader(boolean includeDTD)
includeDTD - - boolean indicator whether to include the DTD.
public static java.lang.String[] serializeMessages(SPMessageClass[] messages)
messages - SPMessageClass[] - the messages to be serialized
public static java.lang.String[] XMLserializefooter()
|
SecurePlayLibray J2SE v2.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||