- java.lang.Object
-
- org.glassfish.jaxb.runtime.DatatypeConverterImpl
-
- All Implemented Interfaces:
jakarta.xml.bind.DatatypeConverterInterface
@Deprecated public final class DatatypeConverterImpl extends Object implements jakarta.xml.bind.DatatypeConverterInterface
Deprecated.in JAXB 2.2.4 - use jakarta.xml.bind.DatatypeConverterImpl instead or let us know why you can'tThis class is the JAXB RI's default implementation of theDatatypeConverterInterface.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 Modifier and Type Field Description static jakarta.xml.bind.DatatypeConverterInterfacetheInstanceDeprecated.
-
Constructor Summary
Constructors Modifier Constructor Description protectedDatatypeConverterImpl()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static byte[]_parseBase64Binary(String text)Deprecated.static Boolean_parseBoolean(CharSequence literal)Deprecated.static byte_parseByte(CharSequence literal)Deprecated.static GregorianCalendar_parseDateTime(CharSequence s)Deprecated.static BigDecimal_parseDecimal(CharSequence content)Deprecated.static double_parseDouble(CharSequence _val)Deprecated.static float_parseFloat(CharSequence _val)Deprecated.static int_parseInt(CharSequence s)Deprecated.Faster but less robustString->intconversion.static BigInteger_parseInteger(CharSequence s)Deprecated.static long_parseLong(CharSequence s)Deprecated.static QName_parseQName(CharSequence text, NamespaceContext nsc)Deprecated.static short_parseShort(CharSequence s)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 charencode(int i)Deprecated.static byteencodeByte(int i)Deprecated.static DatatypeFactorygetDatatypeFactory()Deprecated.StringparseAnySimpleType(String lexicalXSDAnySimpleType)Deprecated.byte[]parseBase64Binary(String lexicalXSDBase64Binary)Deprecated.booleanparseBoolean(String lexicalXSDBoolean)Deprecated.byteparseByte(String lexicalXSDByte)Deprecated.CalendarparseDate(String lexicalXSDDate)Deprecated.CalendarparseDateTime(String lexicalXSDDateTime)Deprecated.BigDecimalparseDecimal(String content)Deprecated.doubleparseDouble(String lexicalXSDDouble)Deprecated.floatparseFloat(String lexicalXSDFloat)Deprecated.byte[]parseHexBinary(String s)Deprecated.intparseInt(String s)Deprecated.BigIntegerparseInteger(String lexicalXSDInteger)Deprecated.longparseLong(String lexicalXSLong)Deprecated.QNameparseQName(String lexicalXSDQName, NamespaceContext nsc)Deprecated.shortparseShort(String lexicalXSDShort)Deprecated.StringparseString(String lexicalXSDString)Deprecated.CalendarparseTime(String lexicalXSDTime)Deprecated.longparseUnsignedInt(String lexicalXSDUnsignedInt)Deprecated.intparseUnsignedShort(String lexicalXSDUnsignedShort)Deprecated.StringprintAnySimpleType(String val)Deprecated.StringprintBase64Binary(byte[] val)Deprecated.StringprintBoolean(boolean val)Deprecated.StringprintByte(byte val)Deprecated.StringprintDate(Calendar val)Deprecated.StringprintDateTime(Calendar val)Deprecated.StringprintDecimal(BigDecimal val)Deprecated.StringprintDouble(double v)Deprecated.StringprintFloat(float v)Deprecated.StringprintHexBinary(byte[] data)Deprecated.StringprintInt(int val)Deprecated.StringprintInteger(BigInteger val)Deprecated.StringprintLong(long val)Deprecated.StringprintQName(QName val, NamespaceContext nsc)Deprecated.StringprintShort(short val)Deprecated.StringprintString(String val)Deprecated.StringprintTime(Calendar val)Deprecated.StringprintUnsignedInt(long val)Deprecated.StringprintUnsignedShort(int val)Deprecated.
-
-
-
Field Detail
-
theInstance
@Deprecated public static final jakarta.xml.bind.DatatypeConverterInterface theInstance
Deprecated.
-
-
Method Detail
-
_parseInteger
public static BigInteger _parseInteger(CharSequence s)
Deprecated.
-
_printInteger
public static String _printInteger(BigInteger val)
Deprecated.
-
_parseInt
public static int _parseInt(CharSequence s)
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
public static long _parseLong(CharSequence s)
Deprecated.
-
_parseShort
public static short _parseShort(CharSequence s)
Deprecated.
-
_printShort
public static String _printShort(short val)
Deprecated.
-
_parseDecimal
public static BigDecimal _parseDecimal(CharSequence content)
Deprecated.
-
_parseFloat
public static float _parseFloat(CharSequence _val)
Deprecated.
-
_printFloat
public static String _printFloat(float v)
Deprecated.
-
_parseDouble
public static double _parseDouble(CharSequence _val)
Deprecated.
-
_parseBoolean
public static Boolean _parseBoolean(CharSequence literal)
Deprecated.
-
_printBoolean
public static String _printBoolean(boolean val)
Deprecated.
-
_parseByte
public static byte _parseByte(CharSequence literal)
Deprecated.
-
_printByte
public static String _printByte(byte val)
Deprecated.
-
_parseQName
public static QName _parseQName(CharSequence text, NamespaceContext nsc)
Deprecated.- Returns:
- null if fails to convert.
-
_parseDateTime
public static GregorianCalendar _parseDateTime(CharSequence s)
Deprecated.
-
_printInt
public static String _printInt(int val)
Deprecated.
-
_printLong
public static String _printLong(long val)
Deprecated.
-
_printDecimal
public static String _printDecimal(BigDecimal val)
Deprecated.
-
_printDouble
public static String _printDouble(double v)
Deprecated.
-
_printQName
public static String _printQName(QName val, NamespaceContext nsc)
Deprecated.
-
_parseBase64Binary
public static byte[] _parseBase64Binary(String text)
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
public static String _printBase64Binary(byte[] input)
Deprecated.
-
_printBase64Binary
public static String _printBase64Binary(byte[] input, int offset, int len)
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 XMLStreamExceptionDeprecated.- 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
public static DatatypeFactory getDatatypeFactory()
Deprecated.
-
parseString
@Deprecated public String parseString(String lexicalXSDString)
Deprecated.- Specified by:
parseStringin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseInteger
@Deprecated public BigInteger parseInteger(String lexicalXSDInteger)
Deprecated.- Specified by:
parseIntegerin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printInteger
@Deprecated public String printInteger(BigInteger val)
Deprecated.- Specified by:
printIntegerin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseInt
@Deprecated public int parseInt(String s)
Deprecated.- Specified by:
parseIntin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseLong
@Deprecated public long parseLong(String lexicalXSLong)
Deprecated.- Specified by:
parseLongin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseShort
@Deprecated public short parseShort(String lexicalXSDShort)
Deprecated.- Specified by:
parseShortin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printShort
@Deprecated public String printShort(short val)
Deprecated.- Specified by:
printShortin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseDecimal
@Deprecated public BigDecimal parseDecimal(String content)
Deprecated.- Specified by:
parseDecimalin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseFloat
@Deprecated public float parseFloat(String lexicalXSDFloat)
Deprecated.- Specified by:
parseFloatin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printFloat
@Deprecated public String printFloat(float v)
Deprecated.- Specified by:
printFloatin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseDouble
@Deprecated public double parseDouble(String lexicalXSDDouble)
Deprecated.- Specified by:
parseDoublein interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseBoolean
@Deprecated public boolean parseBoolean(String lexicalXSDBoolean)
Deprecated.- Specified by:
parseBooleanin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printBoolean
@Deprecated public String printBoolean(boolean val)
Deprecated.- Specified by:
printBooleanin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseByte
@Deprecated public byte parseByte(String lexicalXSDByte)
Deprecated.- Specified by:
parseBytein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printByte
@Deprecated public String printByte(byte val)
Deprecated.- Specified by:
printBytein interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseQName
@Deprecated public QName parseQName(String lexicalXSDQName, NamespaceContext nsc)
Deprecated.- Specified by:
parseQNamein interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseDateTime
@Deprecated public Calendar parseDateTime(String lexicalXSDDateTime)
Deprecated.- Specified by:
parseDateTimein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printDateTime
@Deprecated public String printDateTime(Calendar val)
Deprecated.- Specified by:
printDateTimein interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseBase64Binary
@Deprecated public byte[] parseBase64Binary(String lexicalXSDBase64Binary)
Deprecated.- Specified by:
parseBase64Binaryin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseHexBinary
@Deprecated public byte[] parseHexBinary(String s)
Deprecated.- Specified by:
parseHexBinaryin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printHexBinary
@Deprecated public String printHexBinary(byte[] data)
Deprecated.- Specified by:
printHexBinaryin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseUnsignedInt
@Deprecated public long parseUnsignedInt(String lexicalXSDUnsignedInt)
Deprecated.- Specified by:
parseUnsignedIntin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printUnsignedInt
@Deprecated public String printUnsignedInt(long val)
Deprecated.- Specified by:
printUnsignedIntin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseUnsignedShort
@Deprecated public int parseUnsignedShort(String lexicalXSDUnsignedShort)
Deprecated.- Specified by:
parseUnsignedShortin interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseTime
@Deprecated public Calendar parseTime(String lexicalXSDTime)
Deprecated.- Specified by:
parseTimein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printTime
@Deprecated public String printTime(Calendar val)
Deprecated.- Specified by:
printTimein interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseDate
@Deprecated public Calendar parseDate(String lexicalXSDDate)
Deprecated.- Specified by:
parseDatein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printDate
@Deprecated public String printDate(Calendar val)
Deprecated.- Specified by:
printDatein interfacejakarta.xml.bind.DatatypeConverterInterface
-
parseAnySimpleType
@Deprecated public String parseAnySimpleType(String lexicalXSDAnySimpleType)
Deprecated.- Specified by:
parseAnySimpleTypein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printString
@Deprecated public String printString(String val)
Deprecated.- Specified by:
printStringin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printInt
@Deprecated public String printInt(int val)
Deprecated.- Specified by:
printIntin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printLong
@Deprecated public String printLong(long val)
Deprecated.- Specified by:
printLongin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printDecimal
@Deprecated public String printDecimal(BigDecimal val)
Deprecated.- Specified by:
printDecimalin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printDouble
@Deprecated public String printDouble(double v)
Deprecated.- Specified by:
printDoublein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printQName
@Deprecated public String printQName(QName val, NamespaceContext nsc)
Deprecated.- Specified by:
printQNamein interfacejakarta.xml.bind.DatatypeConverterInterface
-
printBase64Binary
@Deprecated public String printBase64Binary(byte[] val)
Deprecated.- Specified by:
printBase64Binaryin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printUnsignedShort
@Deprecated public String printUnsignedShort(int val)
Deprecated.- Specified by:
printUnsignedShortin interfacejakarta.xml.bind.DatatypeConverterInterface
-
printAnySimpleType
@Deprecated public String printAnySimpleType(String val)
Deprecated.- Specified by:
printAnySimpleTypein interfacejakarta.xml.bind.DatatypeConverterInterface
-
-