Top Description Inners Fields Constructors Methods
org.glassfish.jaxb.runtime

public final Class DatatypeConverterImpl

extends Object
implements DatatypeConverterInterface
Class Inheritance
All Implemented Interfaces
jakarta.xml.bind.DatatypeConverterInterface
Annotations
@Deprecated
Imports
org.glassfish.jaxb.core.WhiteSpaceProcessor, jakarta.xml.bind.DatatypeConverter, .DatatypeConverterInterface, javax.xml.datatype.DatatypeConfigurationException, .DatatypeFactory, javax.xml.namespace.NamespaceContext, .QName, javax.xml.stream.XMLStreamException, .XMLStreamWriter, java.math.BigDecimal, .BigInteger, java.security.AccessController, .PrivilegedAction, java.util.*

Deprecated

in JAXB 2.2.4 - use jakarta.xml.bind.DatatypeConverterImpl instead or let us know why you can't

This class is the JAXB RI's default implementation of the 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.

Author
Since
JAXB 1.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final byte[]
private static final Map<ClassLoader, DatatypeFactory>
private static final char[]
private static final char[]
hexCode

Deprecated
private static final byte
public static final DatatypeConverterInterface
theInstance

Deprecated

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod 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 String is faster, presumably because JIT can inline a lot of string access (with data of 1K chars, it was twice as fast)
text
)

public static Boolean
public static byte
public static GregorianCalendar
public static BigDecimal
public static double
public static float
public static int
_parseInt(CharSequence s)

Faster but less robust String->int conversion.

public static BigInteger
public static long
public static QName
_parseQName(CharSequence text, NamespaceContext nsc)

Returns: null if fails to convert.

public static short
public static String
_printBase64Binary(byte[] input)

public static String
_printBase64Binary(byte[] input, int offset, int len)

public static int

Returns:

the value of ptr+((len+2)/3)*4, which is the new offset in the output buffer where the further bytes should be placed.
_printBase64Binary
(byte[] input, int offset, int len, char[] buf, int ptr)

Encodes a byte array into a char array by doing base64 encoding.

public static void
_printBase64Binary(byte[] input, int offset, int len, XMLStreamWriter output)

public static int

Returns:

the value of ptr+((len+2)/3)*4, which is the new offset in the output buffer where the further bytes should be placed.
_printBase64Binary
(byte[] input, int offset, int len, byte[] out, int ptr)

Encodes a byte array into another byte array by first doing base64 encoding then encoding the result in ASCII.

public static String
_printBoolean(boolean val)

public static String
_printByte(byte val)

public static String
public static String
public static String
public static String
_printDouble(double v)

public static String
_printFloat(float v)

public static String
_printInt(int val)

public static String
public static String
_printLong(long val)

public static String
public static String
_printShort(short val)

public static char
encode(int i)

public static byte
encodeByte(int i)

public static DatatypeFactory
private static int
guessLength(String text)

computes the length of binary data speculatively.

private static int
hexToBin(char ch)
Deprecated

private static byte[]
private static char[]
private static boolean
public String
parseAnySimpleType(String lexicalXSDAnySimpleType)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseAnySimpleType.

Deprecated

Return a string containing the lexical representation of the simple type.

public byte[]
parseBase64Binary(String lexicalXSDBase64Binary)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseBase64Binary.

Deprecated

Converts the string argument into an array of bytes.

public boolean
parseBoolean(String lexicalXSDBoolean)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseBoolean.

Deprecated

Converts the string argument into a boolean value.

public byte
parseByte(String lexicalXSDByte)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseByte.

Deprecated

Converts the string argument into a byte value.

public Calendar
parseDate(String lexicalXSDDate)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseDate.

Deprecated

Converts the string argument into a Calendar value.

public Calendar
parseDateTime(String lexicalXSDDateTime)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseDateTime.

Deprecated

Converts the string argument into a Calendar value.

public BigDecimal
parseDecimal(String content)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseDecimal.

Deprecated

Converts the string argument into a BigDecimal value.

public double
parseDouble(String lexicalXSDDouble)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseDouble.

Deprecated

Converts the string argument into a double value.

public float
parseFloat(String lexicalXSDFloat)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseFloat.

Deprecated

Converts the string argument into a float value.

public byte[]
parseHexBinary(String s)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseHexBinary.

Deprecated

Converts the string argument into an array of bytes.

public int
parseInt(String s)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseInt.

Deprecated

Convert the string argument into an int value.

public BigInteger
parseInteger(String lexicalXSDInteger)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseInteger.

Deprecated

Convert the string argument into a BigInteger value.

public long
parseLong(String lexicalXSLong)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseLong.

Deprecated

Converts the string argument into a long value.

public QName
parseQName(String lexicalXSDQName, NamespaceContext nsc)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseQName.

Deprecated

Converts the string argument into a QName value.

public short
parseShort(String lexicalXSDShort)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseShort.

Deprecated

Converts the string argument into a short value.

public String
parseString(String lexicalXSDString)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseString.

Deprecated

Convert the string argument into a string.

public Calendar
parseTime(String lexicalXSDTime)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseTime.

Deprecated

Converts the string argument into a Calendar value.

public long
parseUnsignedInt(String lexicalXSDUnsignedInt)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseUnsignedInt.

Deprecated

Converts the string argument into a long value.

public int
parseUnsignedShort(String lexicalXSDUnsignedShort)

Implements jakarta.xml.bind.DatatypeConverterInterface.parseUnsignedShort.

Deprecated

Converts the string argument into an int value.

public String
printAnySimpleType(String val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printAnySimpleType.

Deprecated

Converts a string value into a string.

public String
printBase64Binary(byte[] val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printBase64Binary.

Deprecated

Converts an array of bytes into a string.

public String
printBoolean(boolean val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printBoolean.

Deprecated

Converts a boolean value into a string.

public String
printByte(byte val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printByte.

Deprecated

Converts a byte value into a string.

public String
printDate(Calendar val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printDate.

Deprecated

Converts a Calendar value into a string.

public String
printDateTime(Calendar val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printDateTime.

Deprecated

Converts a Calendar value into a string.

public String
printDecimal(BigDecimal val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printDecimal.

Deprecated

Converts a BigDecimal value into a string.

public String
printDouble(double v)

Implements jakarta.xml.bind.DatatypeConverterInterface.printDouble.

Deprecated

Converts a double value into a string.

public String
printFloat(float v)

Implements jakarta.xml.bind.DatatypeConverterInterface.printFloat.

Deprecated

Converts a float value into a string.

public String
printHexBinary(byte[] data)

Implements jakarta.xml.bind.DatatypeConverterInterface.printHexBinary.

Deprecated

Converts an array of bytes into a string.

public String
printInt(int val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printInt.

Deprecated

Converts an int value into a string.

public String
printInteger(BigInteger val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printInteger.

Deprecated

Converts a BigInteger value into a string.

public String
printLong(long val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printLong.

Deprecated

Converts a long value into a string.

public String
printQName(QName val, NamespaceContext nsc)

Implements jakarta.xml.bind.DatatypeConverterInterface.printQName.

Deprecated

Converts a QName instance into a string.

public String
printShort(short val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printShort.

Deprecated

Converts a short value into a string.

public String
printString(String val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printString.

Deprecated

Converts the string argument into a string.

public String
printTime(Calendar val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printTime.

Deprecated

Converts a Calendar value into a string.

public String
printUnsignedInt(long val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printUnsignedInt.

Deprecated

Converts a long value into a string.

public String
printUnsignedShort(int val)

Implements jakarta.xml.bind.DatatypeConverterInterface.printUnsignedShort.

Deprecated

Converts an int value into a string.

private static CharSequence
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait