Package org.glassfish.jaxb.runtime
Class DatatypeConverterImpl
java.lang.Object
org.glassfish.jaxb.runtime.DatatypeConverterImpl
- All Implemented Interfaces:
DatatypeConverterInterface
@Deprecated
public final class DatatypeConverterImpl
extends Object
implements DatatypeConverterInterface
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.
- Since:
- JAXB 1.0
- Author:
- Ryan Shoemaker, Martin Grebac
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]_parseBase64Binary(String text) Deprecated.static Boolean_parseBoolean(CharSequence literal) Deprecated.static byte_parseByte(CharSequence literal) Deprecated.static GregorianCalendarDeprecated.static BigDecimal_parseDecimal(CharSequence content) Deprecated.static double_parseDouble(CharSequence _val) Deprecated.static float_parseFloat(CharSequence _val) Deprecated.static intDeprecated.Faster but less robustString->intconversion.static BigIntegerDeprecated.static longDeprecated.static QName_parseQName(CharSequence text, NamespaceContext nsc) Deprecated.static shortDeprecated.static String_printBase64Binary(byte[] input) Deprecated.static String_printBase64Binary(byte[] input, int offset, int len) Deprecated.static int_printBase64Binary(byte[] input, int offset, int len, byte[] out, int ptr) Deprecated.Encodes a byte array into another byte array by first doing base64 encoding then encoding the result in ASCII.static int_printBase64Binary(byte[] input, int offset, int len, char[] buf, int ptr) Deprecated.Encodes a byte array into a char array by doing base64 encoding.static void_printBase64Binary(byte[] input, int offset, int len, XMLStreamWriter output) Deprecated.static String_printBoolean(boolean val) Deprecated.static String_printByte(byte val) Deprecated.static String_printDate(Calendar val) Deprecated.static String_printDateTime(Calendar val) Deprecated.static String_printDecimal(BigDecimal val) Deprecated.static String_printDouble(double v) Deprecated.static String_printFloat(float v) Deprecated.static String_printInt(int val) Deprecated.static String_printInteger(BigInteger val) Deprecated.static String_printLong(long val) Deprecated.static String_printQName(QName val, NamespaceContext nsc) Deprecated.static String_printShort(short val) Deprecated.static charencode(int i) Deprecated.static byteencodeByte(int i) Deprecated.static DatatypeFactoryDeprecated.parseAnySimpleType(String lexicalXSDAnySimpleType) Deprecated.byte[]parseBase64Binary(String lexicalXSDBase64Binary) Deprecated.booleanparseBoolean(String lexicalXSDBoolean) Deprecated.byteDeprecated.Deprecated.parseDateTime(String lexicalXSDDateTime) Deprecated.parseDecimal(String content) Deprecated.doubleparseDouble(String lexicalXSDDouble) Deprecated.floatparseFloat(String lexicalXSDFloat) Deprecated.byte[]Deprecated.intDeprecated.parseInteger(String lexicalXSDInteger) Deprecated.longDeprecated.parseQName(String lexicalXSDQName, NamespaceContext nsc) Deprecated.shortparseShort(String lexicalXSDShort) Deprecated.parseString(String lexicalXSDString) Deprecated.Deprecated.longparseUnsignedInt(String lexicalXSDUnsignedInt) Deprecated.intparseUnsignedShort(String lexicalXSDUnsignedShort) Deprecated.printAnySimpleType(String val) Deprecated.printBase64Binary(byte[] val) Deprecated.printBoolean(boolean val) Deprecated.printByte(byte val) Deprecated.Deprecated.printDateTime(Calendar val) Deprecated.printDecimal(BigDecimal val) Deprecated.printDouble(double v) Deprecated.printFloat(float v) Deprecated.printHexBinary(byte[] data) Deprecated.printInt(int val) Deprecated.printInteger(BigInteger val) Deprecated.printLong(long val) Deprecated.printQName(QName val, NamespaceContext nsc) Deprecated.printShort(short val) Deprecated.printString(String val) Deprecated.Deprecated.printUnsignedInt(long val) Deprecated.printUnsignedShort(int val) Deprecated.
-
Field Details
-
theInstance
Deprecated.
-
-
Constructor Details
-
DatatypeConverterImpl
protected DatatypeConverterImpl()Deprecated.
-
-
Method Details
-
_parseInteger
Deprecated. -
_printInteger
Deprecated. -
_parseInt
Deprecated.Faster but less robustString->intconversion. Note that:- XML Schema allows '+', but
Integer.valueOf(String)is not. - XML Schema allows leading and trailing (but not in-between) whitespaces.
Integer.valueOf(String)doesn't allow any.
- XML Schema allows '+', but
-
_parseLong
Deprecated. -
_parseShort
Deprecated. -
_printShort
Deprecated. -
_parseDecimal
Deprecated. -
_parseFloat
Deprecated. -
_printFloat
Deprecated. -
_parseDouble
Deprecated. -
_parseBoolean
Deprecated. -
_printBoolean
Deprecated. -
_parseByte
Deprecated. -
_printByte
Deprecated. -
_parseQName
Deprecated.- Returns:
- null if fails to convert.
-
_parseDateTime
Deprecated. -
_printDateTime
Deprecated. -
_printDate
Deprecated. -
_printInt
Deprecated. -
_printLong
Deprecated. -
_printDecimal
Deprecated. -
_printDouble
Deprecated. -
_printQName
Deprecated. -
_parseBase64Binary
Deprecated.- Parameters:
text- 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 takingStringis faster, presumably because JIT can inline a lot of string access (with data of 1K chars, it was twice as fast)
-
encode
public static char encode(int i) Deprecated. -
encodeByte
public static byte encodeByte(int i) Deprecated. -
_printBase64Binary
Deprecated. -
_printBase64Binary
Deprecated. -
_printBase64Binary
public static int _printBase64Binary(byte[] input, int offset, int len, char[] buf, int ptr) Deprecated.Encodes a byte array into a char array by doing base64 encoding. The caller must supply a big enough buffer.- 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
public static void _printBase64Binary(byte[] input, int offset, int len, XMLStreamWriter output) throws XMLStreamException Deprecated.- Throws:
XMLStreamException
-
_printBase64Binary
public static int _printBase64Binary(byte[] input, int offset, int len, byte[] out, int ptr) Deprecated.Encodes a byte array into another byte array by first doing base64 encoding then encoding the result in ASCII. The caller must supply a big enough buffer.- 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.
-
getDatatypeFactory
Deprecated. -
parseString
Deprecated.- Specified by:
parseStringin interfaceDatatypeConverterInterface
-
parseInteger
Deprecated.- Specified by:
parseIntegerin interfaceDatatypeConverterInterface
-
printInteger
Deprecated.- Specified by:
printIntegerin interfaceDatatypeConverterInterface
-
parseInt
Deprecated.- Specified by:
parseIntin interfaceDatatypeConverterInterface
-
parseLong
Deprecated.- Specified by:
parseLongin interfaceDatatypeConverterInterface
-
parseShort
Deprecated.- Specified by:
parseShortin interfaceDatatypeConverterInterface
-
printShort
Deprecated.- Specified by:
printShortin interfaceDatatypeConverterInterface
-
parseDecimal
Deprecated.- Specified by:
parseDecimalin interfaceDatatypeConverterInterface
-
parseFloat
Deprecated.- Specified by:
parseFloatin interfaceDatatypeConverterInterface
-
printFloat
Deprecated.- Specified by:
printFloatin interfaceDatatypeConverterInterface
-
parseDouble
Deprecated.- Specified by:
parseDoublein interfaceDatatypeConverterInterface
-
parseBoolean
Deprecated.- Specified by:
parseBooleanin interfaceDatatypeConverterInterface
-
printBoolean
Deprecated.- Specified by:
printBooleanin interfaceDatatypeConverterInterface
-
parseByte
Deprecated.- Specified by:
parseBytein interfaceDatatypeConverterInterface
-
printByte
Deprecated.- Specified by:
printBytein interfaceDatatypeConverterInterface
-
parseQName
Deprecated.- Specified by:
parseQNamein interfaceDatatypeConverterInterface
-
parseDateTime
Deprecated.- Specified by:
parseDateTimein interfaceDatatypeConverterInterface
-
printDateTime
Deprecated.- Specified by:
printDateTimein interfaceDatatypeConverterInterface
-
parseBase64Binary
Deprecated.- Specified by:
parseBase64Binaryin interfaceDatatypeConverterInterface
-
parseHexBinary
Deprecated.- Specified by:
parseHexBinaryin interfaceDatatypeConverterInterface
-
printHexBinary
Deprecated.- Specified by:
printHexBinaryin interfaceDatatypeConverterInterface
-
parseUnsignedInt
Deprecated.- Specified by:
parseUnsignedIntin interfaceDatatypeConverterInterface
-
printUnsignedInt
Deprecated.- Specified by:
printUnsignedIntin interfaceDatatypeConverterInterface
-
parseUnsignedShort
Deprecated.- Specified by:
parseUnsignedShortin interfaceDatatypeConverterInterface
-
parseTime
Deprecated.- Specified by:
parseTimein interfaceDatatypeConverterInterface
-
printTime
Deprecated.- Specified by:
printTimein interfaceDatatypeConverterInterface
-
parseDate
Deprecated.- Specified by:
parseDatein interfaceDatatypeConverterInterface
-
printDate
Deprecated.- Specified by:
printDatein interfaceDatatypeConverterInterface
-
parseAnySimpleType
Deprecated.- Specified by:
parseAnySimpleTypein interfaceDatatypeConverterInterface
-
printString
Deprecated.- Specified by:
printStringin interfaceDatatypeConverterInterface
-
printInt
Deprecated.- Specified by:
printIntin interfaceDatatypeConverterInterface
-
printLong
Deprecated.- Specified by:
printLongin interfaceDatatypeConverterInterface
-
printDecimal
Deprecated.- Specified by:
printDecimalin interfaceDatatypeConverterInterface
-
printDouble
Deprecated.- Specified by:
printDoublein interfaceDatatypeConverterInterface
-
printQName
Deprecated.- Specified by:
printQNamein interfaceDatatypeConverterInterface
-
printBase64Binary
Deprecated.- Specified by:
printBase64Binaryin interfaceDatatypeConverterInterface
-
printUnsignedShort
Deprecated.- Specified by:
printUnsignedShortin interfaceDatatypeConverterInterface
-
printAnySimpleType
Deprecated.- Specified by:
printAnySimpleTypein interfaceDatatypeConverterInterface
-