< prev index next >
src/java.xml.bind/share/classes/javax/xml/bind/DatatypeConverter.java
Print this page
*** 292,312 ****
/**
* <p>
* Converts the string argument into a byte value.
*
* <p>
! * String parameter <tt>lexicalXSDQname</tt> must conform to lexical value space specifed at
* <a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part 2:Datatypes specification:QNames</a>
*
* @param lexicalXSDQName
* A string containing lexical representation of xsd:QName.
* @param nsc
* A namespace context for interpreting a prefix within a QName.
* @return
* A QName value represented by the string argument.
* @throws IllegalArgumentException if string parameter does not conform to XML Schema Part 2 specification or
! * if namespace prefix of <tt>lexicalXSDQname</tt> is not bound to a URI in NamespaceContext <tt>nsc</tt>.
*/
public static javax.xml.namespace.QName parseQName( String lexicalXSDQName,
NamespaceContext nsc) {
if (theConverter == null) initConverter();
return theConverter.parseQName( lexicalXSDQName, nsc );
--- 292,312 ----
/**
* <p>
* Converts the string argument into a byte value.
*
* <p>
! * String parameter {@code lexicalXSDQname} must conform to lexical value space specifed at
* <a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part 2:Datatypes specification:QNames</a>
*
* @param lexicalXSDQName
* A string containing lexical representation of xsd:QName.
* @param nsc
* A namespace context for interpreting a prefix within a QName.
* @return
* A QName value represented by the string argument.
* @throws IllegalArgumentException if string parameter does not conform to XML Schema Part 2 specification or
! * if namespace prefix of {@code lexicalXSDQname} is not bound to a URI in NamespaceContext {@code nsc}.
*/
public static javax.xml.namespace.QName parseQName( String lexicalXSDQName,
NamespaceContext nsc) {
if (theConverter == null) initConverter();
return theConverter.parseQName( lexicalXSDQName, nsc );
*** 363,373 ****
* @param lexicalXSDUnsignedInt
* A string containing lexical representation
* of xsd:unsignedInt.
* @return
* A long value represented by the string argument.
! * @throws NumberFormatException if string parameter can not be parsed into a <tt>long</tt> value.
*/
public static long parseUnsignedInt( String lexicalXSDUnsignedInt ) {
if (theConverter == null) initConverter();
return theConverter.parseUnsignedInt( lexicalXSDUnsignedInt );
}
--- 363,373 ----
* @param lexicalXSDUnsignedInt
* A string containing lexical representation
* of xsd:unsignedInt.
* @return
* A long value represented by the string argument.
! * @throws NumberFormatException if string parameter can not be parsed into a {@code long} value.
*/
public static long parseUnsignedInt( String lexicalXSDUnsignedInt ) {
if (theConverter == null) initConverter();
return theConverter.parseUnsignedInt( lexicalXSDUnsignedInt );
}
*** 378,388 ****
* @param lexicalXSDUnsignedShort
* A string containing lexical
* representation of xsd:unsignedShort.
* @return
* An int value represented by the string argument.
! * @throws NumberFormatException if string parameter can not be parsed into an <tt>int</tt> value.
*/
public static int parseUnsignedShort( String lexicalXSDUnsignedShort ) {
if (theConverter == null) initConverter();
return theConverter.parseUnsignedShort( lexicalXSDUnsignedShort );
}
--- 378,388 ----
* @param lexicalXSDUnsignedShort
* A string containing lexical
* representation of xsd:unsignedShort.
* @return
* An int value represented by the string argument.
! * @throws NumberFormatException if string parameter can not be parsed into an {@code int} value.
*/
public static int parseUnsignedShort( String lexicalXSDUnsignedShort ) {
if (theConverter == null) initConverter();
return theConverter.parseUnsignedShort( lexicalXSDUnsignedShort );
}
*** 452,462 ****
* Converts a BigInteger value into a string.
* @param val
* A BigInteger value
* @return
* A string containing a lexical representation of xsd:integer
! * @throws IllegalArgumentException <tt>val</tt> is null.
*/
public static String printInteger( java.math.BigInteger val ) {
if (theConverter == null) initConverter();
return theConverter.printInteger( val );
}
--- 452,462 ----
* Converts a BigInteger value into a string.
* @param val
* A BigInteger value
* @return
* A string containing a lexical representation of xsd:integer
! * @throws IllegalArgumentException {@code val} is null.
*/
public static String printInteger( java.math.BigInteger val ) {
if (theConverter == null) initConverter();
return theConverter.printInteger( val );
}
*** 505,515 ****
* Converts a BigDecimal value into a string.
* @param val
* A BigDecimal value
* @return
* A string containing a lexical representation of xsd:decimal
! * @throws IllegalArgumentException <tt>val</tt> is null.
*/
public static String printDecimal( java.math.BigDecimal val ) {
if (theConverter == null) initConverter();
return theConverter.printDecimal( val );
}
--- 505,515 ----
* Converts a BigDecimal value into a string.
* @param val
* A BigDecimal value
* @return
* A string containing a lexical representation of xsd:decimal
! * @throws IllegalArgumentException {@code val} is null.
*/
public static String printDecimal( java.math.BigDecimal val ) {
if (theConverter == null) initConverter();
return theConverter.printDecimal( val );
}
*** 573,584 ****
* A QName value
* @param nsc
* A namespace context for interpreting a prefix within a QName.
* @return
* A string containing a lexical representation of QName
! * @throws IllegalArgumentException if <tt>val</tt> is null or
! * if <tt>nsc</tt> is non-null or <tt>nsc.getPrefix(nsprefixFromVal)</tt> is null.
*/
public static String printQName( javax.xml.namespace.QName val,
NamespaceContext nsc ) {
if (theConverter == null) initConverter();
return theConverter.printQName( val, nsc );
--- 573,584 ----
* A QName value
* @param nsc
* A namespace context for interpreting a prefix within a QName.
* @return
* A string containing a lexical representation of QName
! * @throws IllegalArgumentException if {@code val} is null or
! * if {@code nsc} is non-null or {@code nsc.getPrefix(nsprefixFromVal)} is null.
*/
public static String printQName( javax.xml.namespace.QName val,
NamespaceContext nsc ) {
if (theConverter == null) initConverter();
return theConverter.printQName( val, nsc );
*** 589,599 ****
* Converts a Calendar value into a string.
* @param val
* A Calendar value
* @return
* A string containing a lexical representation of xsd:dateTime
! * @throws IllegalArgumentException if <tt>val</tt> is null.
*/
public static String printDateTime( java.util.Calendar val ) {
if (theConverter == null) initConverter();
return theConverter.printDateTime( val );
}
--- 589,599 ----
* Converts a Calendar value into a string.
* @param val
* A Calendar value
* @return
* A string containing a lexical representation of xsd:dateTime
! * @throws IllegalArgumentException if {@code val} is null.
*/
public static String printDateTime( java.util.Calendar val ) {
if (theConverter == null) initConverter();
return theConverter.printDateTime( val );
}
*** 603,613 ****
* Converts an array of bytes into a string.
* @param val
* An array of bytes
* @return
* A string containing a lexical representation of xsd:base64Binary
! * @throws IllegalArgumentException if <tt>val</tt> is null.
*/
public static String printBase64Binary( byte[] val ) {
if (theConverter == null) initConverter();
return theConverter.printBase64Binary( val );
}
--- 603,613 ----
* Converts an array of bytes into a string.
* @param val
* An array of bytes
* @return
* A string containing a lexical representation of xsd:base64Binary
! * @throws IllegalArgumentException if {@code val} is null.
*/
public static String printBase64Binary( byte[] val ) {
if (theConverter == null) initConverter();
return theConverter.printBase64Binary( val );
}
*** 617,627 ****
* Converts an array of bytes into a string.
* @param val
* An array of bytes
* @return
* A string containing a lexical representation of xsd:hexBinary
! * @throws IllegalArgumentException if <tt>val</tt> is null.
*/
public static String printHexBinary( byte[] val ) {
if (theConverter == null) initConverter();
return theConverter.printHexBinary( val );
}
--- 617,627 ----
* Converts an array of bytes into a string.
* @param val
* An array of bytes
* @return
* A string containing a lexical representation of xsd:hexBinary
! * @throws IllegalArgumentException if {@code val} is null.
*/
public static String printHexBinary( byte[] val ) {
if (theConverter == null) initConverter();
return theConverter.printHexBinary( val );
}
*** 657,667 ****
* Converts a Calendar value into a string.
* @param val
* A Calendar value
* @return
* A string containing a lexical representation of xsd:time
! * @throws IllegalArgumentException if <tt>val</tt> is null.
*/
public static String printTime( java.util.Calendar val ) {
if (theConverter == null) initConverter();
return theConverter.printTime( val );
}
--- 657,667 ----
* Converts a Calendar value into a string.
* @param val
* A Calendar value
* @return
* A string containing a lexical representation of xsd:time
! * @throws IllegalArgumentException if {@code val} is null.
*/
public static String printTime( java.util.Calendar val ) {
if (theConverter == null) initConverter();
return theConverter.printTime( val );
}
*** 671,681 ****
* Converts a Calendar value into a string.
* @param val
* A Calendar value
* @return
* A string containing a lexical representation of xsd:date
! * @throws IllegalArgumentException if <tt>val</tt> is null.
*/
public static String printDate( java.util.Calendar val ) {
if (theConverter == null) initConverter();
return theConverter.printDate( val );
}
--- 671,681 ----
* Converts a Calendar value into a string.
* @param val
* A Calendar value
* @return
* A string containing a lexical representation of xsd:date
! * @throws IllegalArgumentException if {@code val} is null.
*/
public static String printDate( java.util.Calendar val ) {
if (theConverter == null) initConverter();
return theConverter.printDate( val );
}
< prev index next >