com.sun.xml.bind
Class DatatypeConverterImpl

java.lang.Object
  extended by com.sun.xml.bind.DatatypeConverterImpl

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

public final class DatatypeConverterImpl
extends Object

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:
JAXB1.0
Author:

Constructor Summary
protected DatatypeConverterImpl()
          Deprecated.  
 
Method Summary
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 robust String->int conversion.
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, javax.xml.stream.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.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatatypeConverterImpl

protected DatatypeConverterImpl()
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 robust String->int conversion. Note that:
  1. XML Schema allows '+', but Integer.valueOf(String) is not.
  2. XML Schema allows leading and trailing (but not in-between) whitespaces. Integer.valueOf(String) doesn't allow any.


_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. 

_printDateTime

public static String _printDateTime(Calendar val)
Deprecated. 

_printDate

public static String _printDate(Calendar val)
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 taking String 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

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,
                                      javax.xml.stream.XMLStreamWriter output)
                               throws javax.xml.stream.XMLStreamException
Deprecated. 
Throws:
javax.xml.stream.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.


Copyright © 2005-2012 Oracle Corporation. All Rights Reserved.