Package com.sun.xml.bind
Class DatatypeConverterImpl
java.lang.Object
com.sun.xml.bind.DatatypeConverterImpl
- All Implemented Interfaces:
javax.xml.bind.DatatypeConverterInterface
@Deprecated
public final class DatatypeConverterImpl
extends Object
implements javax.xml.bind.DatatypeConverterInterface
Deprecated.
in JAXB 2.2.4 - use javax.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
FieldsModifier and TypeFieldDescriptionstatic final javax.xml.bind.DatatypeConverterInterfaceDeprecated. -
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 interfacejavax.xml.bind.DatatypeConverterInterface
-
parseInteger
Deprecated.- Specified by:
parseIntegerin interfacejavax.xml.bind.DatatypeConverterInterface
-
printInteger
Deprecated.- Specified by:
printIntegerin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseInt
Deprecated.- Specified by:
parseIntin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseLong
Deprecated.- Specified by:
parseLongin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseShort
Deprecated.- Specified by:
parseShortin interfacejavax.xml.bind.DatatypeConverterInterface
-
printShort
Deprecated.- Specified by:
printShortin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseDecimal
Deprecated.- Specified by:
parseDecimalin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseFloat
Deprecated.- Specified by:
parseFloatin interfacejavax.xml.bind.DatatypeConverterInterface
-
printFloat
Deprecated.- Specified by:
printFloatin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseDouble
Deprecated.- Specified by:
parseDoublein interfacejavax.xml.bind.DatatypeConverterInterface
-
parseBoolean
Deprecated.- Specified by:
parseBooleanin interfacejavax.xml.bind.DatatypeConverterInterface
-
printBoolean
Deprecated.- Specified by:
printBooleanin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseByte
Deprecated.- Specified by:
parseBytein interfacejavax.xml.bind.DatatypeConverterInterface
-
printByte
Deprecated.- Specified by:
printBytein interfacejavax.xml.bind.DatatypeConverterInterface
-
parseQName
Deprecated.- Specified by:
parseQNamein interfacejavax.xml.bind.DatatypeConverterInterface
-
parseDateTime
Deprecated.- Specified by:
parseDateTimein interfacejavax.xml.bind.DatatypeConverterInterface
-
printDateTime
Deprecated.- Specified by:
printDateTimein interfacejavax.xml.bind.DatatypeConverterInterface
-
parseBase64Binary
Deprecated.- Specified by:
parseBase64Binaryin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseHexBinary
Deprecated.- Specified by:
parseHexBinaryin interfacejavax.xml.bind.DatatypeConverterInterface
-
printHexBinary
Deprecated.- Specified by:
printHexBinaryin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseUnsignedInt
Deprecated.- Specified by:
parseUnsignedIntin interfacejavax.xml.bind.DatatypeConverterInterface
-
printUnsignedInt
Deprecated.- Specified by:
printUnsignedIntin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseUnsignedShort
Deprecated.- Specified by:
parseUnsignedShortin interfacejavax.xml.bind.DatatypeConverterInterface
-
parseTime
Deprecated.- Specified by:
parseTimein interfacejavax.xml.bind.DatatypeConverterInterface
-
printTime
Deprecated.- Specified by:
printTimein interfacejavax.xml.bind.DatatypeConverterInterface
-
parseDate
Deprecated.- Specified by:
parseDatein interfacejavax.xml.bind.DatatypeConverterInterface
-
printDate
Deprecated.- Specified by:
printDatein interfacejavax.xml.bind.DatatypeConverterInterface
-
parseAnySimpleType
Deprecated.- Specified by:
parseAnySimpleTypein interfacejavax.xml.bind.DatatypeConverterInterface
-
printString
Deprecated.- Specified by:
printStringin interfacejavax.xml.bind.DatatypeConverterInterface
-
printInt
Deprecated.- Specified by:
printIntin interfacejavax.xml.bind.DatatypeConverterInterface
-
printLong
Deprecated.- Specified by:
printLongin interfacejavax.xml.bind.DatatypeConverterInterface
-
printDecimal
Deprecated.- Specified by:
printDecimalin interfacejavax.xml.bind.DatatypeConverterInterface
-
printDouble
Deprecated.- Specified by:
printDoublein interfacejavax.xml.bind.DatatypeConverterInterface
-
printQName
Deprecated.- Specified by:
printQNamein interfacejavax.xml.bind.DatatypeConverterInterface
-
printBase64Binary
Deprecated.- Specified by:
printBase64Binaryin interfacejavax.xml.bind.DatatypeConverterInterface
-
printUnsignedShort
Deprecated.- Specified by:
printUnsignedShortin interfacejavax.xml.bind.DatatypeConverterInterface
-
printAnySimpleType
Deprecated.- Specified by:
printAnySimpleTypein interfacejavax.xml.bind.DatatypeConverterInterface
-