DatatypeConverterInterface.
When client applications specify the use of the static print/parse
methods in DatatypeConverter, it will delegate
to this class.
This class is responsible for whitespace normalization.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final DatatypeFactory | |
| private static final byte[] | |
| private static final char[] | |
| private static final char[] | |
| private static final byte | |
| public static final DatatypeConverterInterface | theInstance
To avoid re-creating instances, we cache one instance. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | _parseBase64Binary(String
base64Binary data is likely to be long, and decoding requires
each character to be accessed twice (once for counting length, another
for decoding.)
A benchmark showed that taking text)String is faster, presumably
because JIT can inline a lot of string access (with data of 1K chars, it was twice as fast)
|
| public static Boolean | |
| public static byte | |
| public static GregorianCalendar | |
| public static BigDecimal | |
| public static double | |
| public static float | |
| public static int | |
| public static BigInteger | |
| public static long | |
| public static QName | |
| public static short | |
| public static String | |
| public static String | |
| public static int | Returns: the value ofptr+((len+2)/3)*4, which is the new offset
in the output buffer where the further bytes should be placed.Encodes a byte array into a char array by doing base64 encoding. |
| public static int | Returns: the value ofptr+((len+2)/3)*4, which is the new offset
in the output buffer where the further bytes should be placed.Encodes a byte array into another byte array by first doing base64 encoding then encoding the result in ASCII. |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static String | |
| public static char | |
| public static byte | |
| private static int | |
| private static int | |
| private static byte[] | |
| private static char[] | |
| public static String | installHook(String s)
Just return the string passed as a parameter but installs an instance of this class as the DatatypeConverter implementation. |
| private static boolean | |
| public String | parseAnySimpleType(String
A string containing lexical
representation of the simple type. lexicalXSDAnySimpleType)Implements jakarta. |
| public byte[] | parseBase64Binary(String
A string containing lexical representation
of xsd:base64Binary. lexicalXSDBase64Binary)Implements jakarta. |
| public boolean | parseBoolean(String
A string containing lexical representation of
xsd:boolean. lexicalXSDBoolean)Implements jakarta. |
| public byte | parseByte(String
A string containing lexical representation of
xsd:byte. lexicalXSDByte)Implements jakarta. |
| public Calendar | parseDate(String
A string containing lexical representation of
xsd:Date. lexicalXSDDate)Implements jakarta. |
| public Calendar | parseDateTime(String
A string containing lexical representation of
xsd:datetime. lexicalXSDDateTime)Implements jakarta. |
| public BigDecimal | parseDecimal(String
A string containing lexical representation of
xsd:decimal. content)Implements jakarta. |
| public double | parseDouble(String
A string containing lexical representation of
xsd:double. lexicalXSDDouble)Implements jakarta. |
| public float | parseFloat(String
A string containing lexical representation of
xsd:float. lexicalXSDFloat)Implements jakarta. |
| public byte[] | parseHexBinary(String
A string containing lexical representation of
xsd:hexBinary. s)Implements jakarta. |
| public int | parseInt(String
A string containing a lexical representation of
xsd:int. s)Implements jakarta. |
| public BigInteger | parseInteger(String
A string containing a lexical representation of
xsd:integer. lexicalXSDInteger)Implements jakarta. |
| public long | parseLong(String
A string containing lexical representation of
xsd:long. lexicalXSLong)Implements jakarta. |
| public QName | parseQName(String
A string containing lexical representation of xsd:QName. lexicalXSDQName, NamespaceContext A namespace context for interpreting a prefix within a QName. nsc)Implements jakarta. |
| public short | parseShort(String
A string containing lexical representation of
xsd:short. lexicalXSDShort)Implements jakarta. |
| public String | parseString(String
A lexical representation of the XML Schema datatype xsd:string lexicalXSDString)Implements jakarta. |
| public Calendar | parseTime(String
A string containing lexical representation of
xsd:Time. lexicalXSDTime)Implements jakarta. |
| public long | parseUnsignedInt(String
A string containing lexical representation
of xsd:unsignedInt. lexicalXSDUnsignedInt)Implements jakarta. |
| public int | parseUnsignedShort(String
A string containing lexical
representation of xsd:unsignedShort. lexicalXSDUnsignedShort)Implements jakarta. |
| public String | printAnySimpleType(String
A string value val)Implements jakarta. |
| public String | printBase64Binary(byte[]
an array of bytes val)Implements jakarta. |
| public String | printBoolean(boolean
A boolean value val)Implements jakarta. |
| public String | printByte(byte
A byte value val)Implements jakarta. |
| public String | printDate(Calendar
A Calendar value val)Implements jakarta. |
| public String | printDateTime(Calendar
A Calendar value val)Implements jakarta. |
| public String | printDecimal(BigDecimal
A BigDecimal value val)Implements jakarta. |
| public String | printDouble(double
A double value v)Implements jakarta. |
| public String | printFloat(float
A float value v)Implements jakarta. |
| public String | printHexBinary(byte[]
an array of bytes data)Implements jakarta. |
| public String | printInt(int
An int value val)Implements jakarta. |
| public String | printInteger(BigInteger
A BigInteger value val)Implements jakarta. |
| public String | printLong(long
A long value val)Implements jakarta. |
| public String | printQName(QName
A QName value val, NamespaceContext A namespace context for interpreting a prefix within a QName. nsc)Implements jakarta. |
| public String | printShort(short
A short value val)Implements jakarta. |
| public String | printString(String
A string value. val)Implements jakarta. |
| public String | printTime(Calendar
A Calendar value val)Implements jakarta. |
| public String | printUnsignedInt(long
A long value val)Implements jakarta. |
| public String | printUnsignedShort(int
An int value val)Implements jakarta. |
| private static CharSequence |