Java Doc for DatatypeConverterInterface.java in  » 6.0-JDK-Modules » jaxb-api » javax » xml » bind » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » jaxb api » javax.xml.bind 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.xml.bind.DatatypeConverterInterface

All known Subclasses:   javax.xml.bind.DatatypeConverterImpl,
DatatypeConverterInterface
public interface DatatypeConverterInterface (Code)

The DatatypeConverterInterface is for JAXB provider use only. A JAXB provider must supply a class that implements this interface. JAXB Providers are required to call the DatatypeConverter.setDatatypeConverter(DatatypeConverterInterface) DatatypeConverter.setDatatypeConverter api at some point before the first marshal or unmarshal operation (perhaps during the call to JAXBContext.newInstance). This step is necessary to configure the converter that should be used to perform the print and parse functionality. Calling this api repeatedly will have no effect - the DatatypeConverter instance passed into the first invocation is the one that will be used from then on.

This interface defines the parse and print methods. There is one parse and print method for each XML schema datatype specified in the the default binding Table 5-1 in the JAXB specification.

The parse and print methods defined here are invoked by the static parse and print methods defined in the DatatypeConverter DatatypeConverter class.

A parse method for a XML schema datatype must be capable of converting any lexical representation of the XML schema datatype ( specified by the XML Schema Part2: Datatypes specification into a value in the value space of the XML schema datatype. If an error is encountered during conversion, then an IllegalArgumentException or a subclass of IllegalArgumentException must be thrown by the method.

A print method for a XML schema datatype can output any lexical representation that is valid with respect to the XML schema datatype. If an error is encountered during conversion, then an IllegalArgumentException, or a subclass of IllegalArgumentException must be thrown by the method.

The prefix xsd: is used to refer to XML schema datatypes XML Schema Part2: Datatypes specification.


author:
  

  • Sekhar Vajjhala, Sun Microsystems, Inc.
  • Joe Fialli, Sun Microsystems Inc.
  • Kohsuke Kawaguchi, Sun Microsystems, Inc.
  • Ryan Shoemaker,Sun Microsystems Inc.

version:
   $Revision: 1.5 $
See Also:   DatatypeConverter
See Also:   ParseConversionEvent
See Also:   PrintConversionEvent
since:
   JAXB1.0




Method Summary
public  StringparseAnySimpleType(String lexicalXSDAnySimpleType)
    

Return a string containing the lexical representation of the simple type.

public  byte[]parseBase64Binary(String lexicalXSDBase64Binary)
    

Converts the string argument into an array of bytes.

public  booleanparseBoolean(String lexicalXSDBoolean)
    

Converts the string argument into a boolean value.

public  byteparseByte(String lexicalXSDByte)
    

Converts the string argument into a byte value.

public  java.util.CalendarparseDate(String lexicalXSDDate)
    

Converts the string argument into a Calendar value.

public  java.util.CalendarparseDateTime(String lexicalXSDDateTime)
    

Converts the string argument into a Calendar value.

public  java.math.BigDecimalparseDecimal(String lexicalXSDDecimal)
    

Converts the string argument into a BigDecimal value.

public  doubleparseDouble(String lexicalXSDDouble)
    

Converts the string argument into a double value.

public  floatparseFloat(String lexicalXSDFloat)
    

Converts the string argument into a float value.

public  byte[]parseHexBinary(String lexicalXSDHexBinary)
    

Converts the string argument into an array of bytes.

public  intparseInt(String lexicalXSDInt)
    

Convert the string argument into an int value.

public  java.math.BigIntegerparseInteger(String lexicalXSDInteger)
    

Convert the string argument into a BigInteger value.

public  longparseLong(String lexicalXSDLong)
    

Converts the string argument into a long value.

public  javax.xml.namespace.QNameparseQName(String lexicalXSDQName, javax.xml.namespace.NamespaceContext nsc)
    

Converts the string argument into a QName value.

public  shortparseShort(String lexicalXSDShort)
    

Converts the string argument into a short value.

public  StringparseString(String lexicalXSDString)
    

Convert the string argument into a string.

public  java.util.CalendarparseTime(String lexicalXSDTime)
    

Converts the string argument into a Calendar value.

public  longparseUnsignedInt(String lexicalXSDUnsignedInt)
    

Converts the string argument into a long value.

public  intparseUnsignedShort(String lexicalXSDUnsignedShort)
    

Converts the string argument into an int value.

public  StringprintAnySimpleType(String val)
    

Converts a string value into a string.

public  StringprintBase64Binary(byte[] val)
    

Converts an array of bytes into a string.

public  StringprintBoolean(boolean val)
    

Converts a boolean value into a string.

public  StringprintByte(byte val)
    

Converts a byte value into a string.

public  StringprintDate(java.util.Calendar val)
    

Converts a Calendar value into a string.

public  StringprintDateTime(java.util.Calendar val)
    

Converts a Calendar value into a string.

public  StringprintDecimal(java.math.BigDecimal val)
    

Converts a BigDecimal value into a string.

public  StringprintDouble(double val)
    

Converts a double value into a string.

public  StringprintFloat(float val)
    

Converts a float value into a string.

public  StringprintHexBinary(byte[] val)
    

Converts an array of bytes into a string.

public  StringprintInt(int val)
    

Converts an int value into a string.

public  StringprintInteger(java.math.BigInteger val)
    

Converts a BigInteger value into a string.

public  StringprintLong(long val)
    

Converts a long value into a string.

public  StringprintQName(javax.xml.namespace.QName val, javax.xml.namespace.NamespaceContext nsc)
    

Converts a QName instance into a string.

public  StringprintShort(short val)
    

Converts a short value into a string.

public  StringprintString(String val)
    

Converts the string argument into a string.

public  StringprintTime(java.util.Calendar val)
    

Converts a Calendar value into a string.

public  StringprintUnsignedInt(long val)
    

Converts a long value into a string.

public  StringprintUnsignedShort(int val)
    

Converts an int value into a string.




Method Detail
parseAnySimpleType
public String parseAnySimpleType(String lexicalXSDAnySimpleType)(Code)

Return a string containing the lexical representation of the simple type.
Parameters:
  lexicalXSDAnySimpleType - A string containing lexical representation of the simple type.A string containing the lexical representation of the simple type.




parseBase64Binary
public byte[] parseBase64Binary(String lexicalXSDBase64Binary)(Code)

Converts the string argument into an array of bytes.
Parameters:
  lexicalXSDBase64Binary - A string containing lexical representationof xsd:base64Binary.An array of bytes represented by the string argument.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:base64Binary




parseBoolean
public boolean parseBoolean(String lexicalXSDBoolean)(Code)

Converts the string argument into a boolean value.
Parameters:
  lexicalXSDBoolean - A string containing lexical representation ofxsd:boolean.A boolean value represented by the string argument.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:boolean.




parseByte
public byte parseByte(String lexicalXSDByte)(Code)

Converts the string argument into a byte value.
Parameters:
  lexicalXSDByte - A string containing lexical representation ofxsd:byte.A byte value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDByte does not contain a parseable byte.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:byte.




parseDate
public java.util.Calendar parseDate(String lexicalXSDDate)(Code)

Converts the string argument into a Calendar value.
Parameters:
  lexicalXSDDate - A string containing lexical representation ofxsd:Date.A Calendar value represented by the string argument.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Date.




parseDateTime
public java.util.Calendar parseDateTime(String lexicalXSDDateTime)(Code)

Converts the string argument into a Calendar value.
Parameters:
  lexicalXSDDateTime - A string containing lexical representation ofxsd:datetime.A Calendar object represented by the string argument.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:dateTime.




parseDecimal
public java.math.BigDecimal parseDecimal(String lexicalXSDDecimal)(Code)

Converts the string argument into a BigDecimal value.
Parameters:
  lexicalXSDDecimal - A string containing lexical representation ofxsd:decimal.A BigDecimal value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDDecimal is not a valid string representation of java.math.BigDecimal.




parseDouble
public double parseDouble(String lexicalXSDDouble)(Code)

Converts the string argument into a double value.
Parameters:
  lexicalXSDDouble - A string containing lexical representation ofxsd:double.A double value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDDouble is not a valid string representation of a double value.




parseFloat
public float parseFloat(String lexicalXSDFloat)(Code)

Converts the string argument into a float value.
Parameters:
  lexicalXSDFloat - A string containing lexical representation ofxsd:float.A float value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDFloat is not a valid string representation of a float value.




parseHexBinary
public byte[] parseHexBinary(String lexicalXSDHexBinary)(Code)

Converts the string argument into an array of bytes.
Parameters:
  lexicalXSDHexBinary - A string containing lexical representation ofxsd:hexBinary.An array of bytes represented by the string argument.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:hexBinary.




parseInt
public int parseInt(String lexicalXSDInt)(Code)

Convert the string argument into an int value.
Parameters:
  lexicalXSDInt - A string containing a lexical representation ofxsd:int.An int value represented byte the string argument.
throws:
  NumberFormatException - lexicalXSDInt is not a valid string representation of an int value.




parseInteger
public java.math.BigInteger parseInteger(String lexicalXSDInteger)(Code)

Convert the string argument into a BigInteger value.
Parameters:
  lexicalXSDInteger - A string containing a lexical representation ofxsd:integer.A BigInteger value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDInteger is not a valid string representation of a java.math.BigInteger value.




parseLong
public long parseLong(String lexicalXSDLong)(Code)

Converts the string argument into a long value.
Parameters:
  lexicalXSDLong - A string containing lexical representation ofxsd:long.A long value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDLong is not a valid string representation of a long value.




parseQName
public javax.xml.namespace.QName parseQName(String lexicalXSDQName, javax.xml.namespace.NamespaceContext nsc)(Code)

Converts the string argument into a QName value.

String parameter lexicalXSDQname must conform to lexical value space specifed at XML Schema Part 2:Datatypes specification:QNames
Parameters:
  lexicalXSDQName - A string containing lexical representation of xsd:QName.
Parameters:
  nsc - A namespace context for interpreting a prefix within a QName.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 lexicalXSDQname is not bound to a URI in NamespaceContext nsc.




parseShort
public short parseShort(String lexicalXSDShort)(Code)

Converts the string argument into a short value.
Parameters:
  lexicalXSDShort - A string containing lexical representation ofxsd:short.A short value represented by the string argument.
throws:
  NumberFormatException - lexicalXSDShort is not a valid string representation of a short value.




parseString
public String parseString(String lexicalXSDString)(Code)

Convert the string argument into a string.
Parameters:
  lexicalXSDString - A lexical representation of the XML Schema datatype xsd:stringA string that is the same as the input string.




parseTime
public java.util.Calendar parseTime(String lexicalXSDTime)(Code)

Converts the string argument into a Calendar value.
Parameters:
  lexicalXSDTime - A string containing lexical representation ofxsd:Time.A Calendar value represented by the string argument.
throws:
  IllegalArgumentException - if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes for xsd:Time.




parseUnsignedInt
public long parseUnsignedInt(String lexicalXSDUnsignedInt)(Code)

Converts the string argument into a long value.
Parameters:
  lexicalXSDUnsignedInt - A string containing lexical representationof xsd:unsignedInt.A long value represented by the string argument.
throws:
  NumberFormatException - if string parameter can not be parsed into a long value.




parseUnsignedShort
public int parseUnsignedShort(String lexicalXSDUnsignedShort)(Code)

Converts the string argument into an int value.
Parameters:
  lexicalXSDUnsignedShort - A string containing lexicalrepresentation of xsd:unsignedShort.An int value represented by the string argument.
throws:
  NumberFormatException - if string parameter can not be parsed into an int value.




printAnySimpleType
public String printAnySimpleType(String val)(Code)

Converts a string value into a string.
Parameters:
  val - A string valueA string containing a lexical representation of xsd:AnySimpleType




printBase64Binary
public String printBase64Binary(byte[] val)(Code)

Converts an array of bytes into a string.
Parameters:
  val - an array of bytesA string containing a lexical representation of xsd:base64Binary
throws:
  IllegalArgumentException - if val is null.




printBoolean
public String printBoolean(boolean val)(Code)

Converts a boolean value into a string.
Parameters:
  val - A boolean valueA string containing a lexical representation of xsd:boolean




printByte
public String printByte(byte val)(Code)

Converts a byte value into a string.
Parameters:
  val - A byte valueA string containing a lexical representation of xsd:byte




printDate
public String printDate(java.util.Calendar val)(Code)

Converts a Calendar value into a string.
Parameters:
  val - A Calendar valueA string containing a lexical representation of xsd:date
throws:
  IllegalArgumentException - if val is null.




printDateTime
public String printDateTime(java.util.Calendar val)(Code)

Converts a Calendar value into a string.
Parameters:
  val - A Calendar valueA string containing a lexical representation of xsd:dateTime
throws:
  IllegalArgumentException - if val is null.




printDecimal
public String printDecimal(java.math.BigDecimal val)(Code)

Converts a BigDecimal value into a string.
Parameters:
  val - A BigDecimal valueA string containing a lexical representation of xsd:decimal
throws:
  IllegalArgumentException - val is null.




printDouble
public String printDouble(double val)(Code)

Converts a double value into a string.
Parameters:
  val - A double valueA string containing a lexical representation of xsd:double




printFloat
public String printFloat(float val)(Code)

Converts a float value into a string.
Parameters:
  val - A float valueA string containing a lexical representation of xsd:float




printHexBinary
public String printHexBinary(byte[] val)(Code)

Converts an array of bytes into a string.
Parameters:
  val - an array of bytesA string containing a lexical representation of xsd:hexBinary
throws:
  IllegalArgumentException - if val is null.




printInt
public String printInt(int val)(Code)

Converts an int value into a string.
Parameters:
  val - An int valueA string containing a lexical representation of xsd:int




printInteger
public String printInteger(java.math.BigInteger val)(Code)

Converts a BigInteger value into a string.
Parameters:
  val - A BigInteger valueA string containing a lexical representation of xsd:integer
throws:
  IllegalArgumentException - val is null.




printLong
public String printLong(long val)(Code)

Converts a long value into a string.
Parameters:
  val - A long valueA string containing a lexical representation of xsd:long




printQName
public String printQName(javax.xml.namespace.QName val, javax.xml.namespace.NamespaceContext nsc)(Code)

Converts a QName instance into a string.
Parameters:
  val - A QName value
Parameters:
  nsc - A namespace context for interpreting a prefix within a QName.A string containing a lexical representation of QName
throws:
  IllegalArgumentException - if val is null or if nsc is non-null or nsc.getPrefix(nsprefixFromVal) is null.




printShort
public String printShort(short val)(Code)

Converts a short value into a string.
Parameters:
  val - A short valueA string containing a lexical representation of xsd:short




printString
public String printString(String val)(Code)

Converts the string argument into a string.
Parameters:
  val - A string value.A string containing a lexical representation of xsd:string




printTime
public String printTime(java.util.Calendar val)(Code)

Converts a Calendar value into a string.
Parameters:
  val - A Calendar valueA string containing a lexical representation of xsd:time
throws:
  IllegalArgumentException - if val is null.




printUnsignedInt
public String printUnsignedInt(long val)(Code)

Converts a long value into a string.
Parameters:
  val - A long valueA string containing a lexical representation of xsd:unsignedInt




printUnsignedShort
public String printUnsignedShort(int val)(Code)

Converts an int value into a string.
Parameters:
  val - An int valueA string containing a lexical representation of xsd:unsignedShort




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.