Package com.sun.xml.bind
Class DatatypeConverterImpl
java.lang.Object
com.sun.xml.bind.DatatypeConverterImpl
- All Implemented Interfaces:
DatatypeConverterInterface
@Deprecated
public final class DatatypeConverterImpl
extends Object
implements 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
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 GregorianCalendar
Deprecated.static BigDecimal
_parseDecimal
(CharSequence content) Deprecated.static double
_parseDouble
(CharSequence _val) Deprecated.static float
_parseFloat
(CharSequence _val) Deprecated.static int
Deprecated.Faster but less robustString->int
conversion.static BigInteger
Deprecated.static long
Deprecated.static QName
_parseQName
(CharSequence text, NamespaceContext nsc) Deprecated.static short
Deprecated.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 char
encode
(int i) Deprecated.static byte
encodeByte
(int i) Deprecated.static DatatypeFactory
Deprecated.parseAnySimpleType
(String lexicalXSDAnySimpleType) Deprecated.byte[]
parseBase64Binary
(String lexicalXSDBase64Binary) Deprecated.boolean
parseBoolean
(String lexicalXSDBoolean) Deprecated.byte
Deprecated.Deprecated.parseDateTime
(String lexicalXSDDateTime) Deprecated.parseDecimal
(String content) Deprecated.double
parseDouble
(String lexicalXSDDouble) Deprecated.float
parseFloat
(String lexicalXSDFloat) Deprecated.byte[]
Deprecated.int
Deprecated.parseInteger
(String lexicalXSDInteger) Deprecated.long
Deprecated.parseQName
(String lexicalXSDQName, NamespaceContext nsc) Deprecated.short
parseShort
(String lexicalXSDShort) Deprecated.parseString
(String lexicalXSDString) Deprecated.Deprecated.long
parseUnsignedInt
(String lexicalXSDUnsignedInt) Deprecated.int
parseUnsignedShort
(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->int
conversion. 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 takingString
is 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:
parseString
in interfaceDatatypeConverterInterface
-
parseInteger
Deprecated.- Specified by:
parseInteger
in interfaceDatatypeConverterInterface
-
printInteger
Deprecated.- Specified by:
printInteger
in interfaceDatatypeConverterInterface
-
parseInt
Deprecated.- Specified by:
parseInt
in interfaceDatatypeConverterInterface
-
parseLong
Deprecated.- Specified by:
parseLong
in interfaceDatatypeConverterInterface
-
parseShort
Deprecated.- Specified by:
parseShort
in interfaceDatatypeConverterInterface
-
printShort
Deprecated.- Specified by:
printShort
in interfaceDatatypeConverterInterface
-
parseDecimal
Deprecated.- Specified by:
parseDecimal
in interfaceDatatypeConverterInterface
-
parseFloat
Deprecated.- Specified by:
parseFloat
in interfaceDatatypeConverterInterface
-
printFloat
Deprecated.- Specified by:
printFloat
in interfaceDatatypeConverterInterface
-
parseDouble
Deprecated.- Specified by:
parseDouble
in interfaceDatatypeConverterInterface
-
parseBoolean
Deprecated.- Specified by:
parseBoolean
in interfaceDatatypeConverterInterface
-
printBoolean
Deprecated.- Specified by:
printBoolean
in interfaceDatatypeConverterInterface
-
parseByte
Deprecated.- Specified by:
parseByte
in interfaceDatatypeConverterInterface
-
printByte
Deprecated.- Specified by:
printByte
in interfaceDatatypeConverterInterface
-
parseQName
Deprecated.- Specified by:
parseQName
in interfaceDatatypeConverterInterface
-
parseDateTime
Deprecated.- Specified by:
parseDateTime
in interfaceDatatypeConverterInterface
-
printDateTime
Deprecated.- Specified by:
printDateTime
in interfaceDatatypeConverterInterface
-
parseBase64Binary
Deprecated.- Specified by:
parseBase64Binary
in interfaceDatatypeConverterInterface
-
parseHexBinary
Deprecated.- Specified by:
parseHexBinary
in interfaceDatatypeConverterInterface
-
printHexBinary
Deprecated.- Specified by:
printHexBinary
in interfaceDatatypeConverterInterface
-
parseUnsignedInt
Deprecated.- Specified by:
parseUnsignedInt
in interfaceDatatypeConverterInterface
-
printUnsignedInt
Deprecated.- Specified by:
printUnsignedInt
in interfaceDatatypeConverterInterface
-
parseUnsignedShort
Deprecated.- Specified by:
parseUnsignedShort
in interfaceDatatypeConverterInterface
-
parseTime
Deprecated.- Specified by:
parseTime
in interfaceDatatypeConverterInterface
-
printTime
Deprecated.- Specified by:
printTime
in interfaceDatatypeConverterInterface
-
parseDate
Deprecated.- Specified by:
parseDate
in interfaceDatatypeConverterInterface
-
printDate
Deprecated.- Specified by:
printDate
in interfaceDatatypeConverterInterface
-
parseAnySimpleType
Deprecated.- Specified by:
parseAnySimpleType
in interfaceDatatypeConverterInterface
-
printString
Deprecated.- Specified by:
printString
in interfaceDatatypeConverterInterface
-
printInt
Deprecated.- Specified by:
printInt
in interfaceDatatypeConverterInterface
-
printLong
Deprecated.- Specified by:
printLong
in interfaceDatatypeConverterInterface
-
printDecimal
Deprecated.- Specified by:
printDecimal
in interfaceDatatypeConverterInterface
-
printDouble
Deprecated.- Specified by:
printDouble
in interfaceDatatypeConverterInterface
-
printQName
Deprecated.- Specified by:
printQName
in interfaceDatatypeConverterInterface
-
printBase64Binary
Deprecated.- Specified by:
printBase64Binary
in interfaceDatatypeConverterInterface
-
printUnsignedShort
Deprecated.- Specified by:
printUnsignedShort
in interfaceDatatypeConverterInterface
-
printAnySimpleType
Deprecated.- Specified by:
printAnySimpleType
in interfaceDatatypeConverterInterface
-