com.objsys.asn1j.runtime
Class Asn1XmlUtil

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1XmlUtil

public class Asn1XmlUtil
extends java.lang.Object


Constructor Summary
Asn1XmlUtil()
           
 
Method Summary
static void encodeDouble(Asn1XmlEncoder buffer, double value)
          This method encodes an ASN.1 real value using the XML encoding (non-XER).
static void encodeDouble(Asn1XmlEncoder buffer, double value, java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes an ASN.1 real value using the XML encoding (non-XER).
static java.lang.String getXMLString(java.lang.String value)
          This method will convert the given string value into XML character content by escaping special characters in the sting such as ampersand (&), left angle bracket (<), etc..
static boolean isMinusZero(double value)
          This method will return true, if value is "minus zero" (-0) special XML value.
static boolean isNaN(double value)
          This method will return true, if value is "not-a-number" (NaN) special XML value.
static java.lang.String[] tokenizeXsdList(java.lang.String listValue)
          Return an array of strings representing the (lexical) values of an xsd:list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Asn1XmlUtil

public Asn1XmlUtil()
Method Detail

encodeDouble

public static void encodeDouble(Asn1XmlEncoder buffer,
                                double value,
                                java.lang.String elemName,
                                java.lang.String nsPrefix)
                         throws java.io.IOException,
                                Asn1Exception
This method encodes an ASN.1 real value using the XML encoding (non-XER).

Parameters:
buffer - Encode message buffer object
value - Value to be encoded.
elemName - Element name
Throws:
java.io.IOException
Asn1Exception

encodeDouble

public static void encodeDouble(Asn1XmlEncoder buffer,
                                double value)
                         throws java.io.IOException,
                                Asn1Exception
This method encodes an ASN.1 real value using the XML encoding (non-XER).

Parameters:
buffer - Encode message buffer object
value - Value to be encoded.
Throws:
java.io.IOException
Asn1Exception

getXMLString

public static java.lang.String getXMLString(java.lang.String value)
This method will convert the given string value into XML character content by escaping special characters in the sting such as ampersand (&), left angle bracket (<), etc..

Parameters:
value - String to convert
Returns:
Converted string value

isMinusZero

public static boolean isMinusZero(double value)
This method will return true, if value is "minus zero" (-0) special XML value.

Parameters:
value - value to test
Returns:
true, if this value is "-0".

isNaN

public static boolean isNaN(double value)
This method will return true, if value is "not-a-number" (NaN) special XML value.

Parameters:
value - value to test
Returns:
true, if this value is NaN.

tokenizeXsdList

public static java.lang.String[] tokenizeXsdList(java.lang.String listValue)
Return an array of strings representing the (lexical) values of an xsd:list

Parameters:
listValue - the lexical value of the xsd:list. It need not have whitepspace collapse applied yet.
Returns:
array of lexical values, one per value in the listValue. No empty strings will appear in the array.