Java Doc for JDBC4MysqlSQLXML.java in  » Database-JDBC-Connection-Pool » mysql-connector-java-5.1.3 » com » mysql » jdbc » 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 » Database JDBC Connection Pool » mysql connector java 5.1.3 » com.mysql.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.mysql.jdbc.JDBC4MysqlSQLXML

JDBC4MysqlSQLXML
public class JDBC4MysqlSQLXML implements SQLXML(Code)

Inner Class :class SimpleSaxToReader extends DefaultHandler


Constructor Summary
protected  JDBC4MysqlSQLXML(ResultSetInternalMethods owner, int index)
    
protected  JDBC4MysqlSQLXML()
    

Method Summary
protected  StringdomSourceToString()
    
public synchronized  voidfree()
    
public synchronized  InputStreamgetBinaryStream()
    
public synchronized  ReadergetCharacterStream()
     Retrieves the XML value designated by this SQLXML instance as a java.io.Reader object.
public synchronized  SourcegetSource(Class clazz)
     Returns a Source for reading the XML value designated by this SQLXML instance.
public synchronized  StringgetString()
    
public synchronized  booleanisEmpty()
    
protected  StringreaderToString(Reader reader)
    
protected synchronized  ReaderserializeAsCharacterStream()
    
protected synchronized  StringserializeAsString()
    
public synchronized  OutputStreamsetBinaryStream()
     Retrieves a stream that can be used to write the XML value that this SQLXML instance represents.
public synchronized  WritersetCharacterStream()
     Retrieves a stream to be used to write the XML value that this SQLXML instance represents.
public synchronized  ResultsetResult(Class clazz)
     Returns a Result for setting the XML value designated by this SQLXML instance.

The systemID of the Result is implementation dependent.

The SQL XML object becomes not writeable when this method is called and may also become not readable depending on implementation.

Note that SAX is a callback architecture and the returned SAXResult has a content handler assigned that will receive the SAX events based on the contents of the XML.

public synchronized  voidsetString(String str)
     Sets the XML value designated by this SQLXML instance to the given String representation.


Constructor Detail
JDBC4MysqlSQLXML
protected JDBC4MysqlSQLXML(ResultSetInternalMethods owner, int index)(Code)



JDBC4MysqlSQLXML
protected JDBC4MysqlSQLXML()(Code)




Method Detail
domSourceToString
protected String domSourceToString() throws SQLException(Code)



free
public synchronized void free() throws SQLException(Code)



getBinaryStream
public synchronized InputStream getBinaryStream() throws SQLException(Code)



getCharacterStream
public synchronized Reader getCharacterStream() throws SQLException(Code)
Retrieves the XML value designated by this SQLXML instance as a java.io.Reader object. The format of this stream is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the stream is unicode. The behavior of this method is the same as ResultSet.getCharacterStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML.

The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation. a stream containing the XML data.
throws:
  SQLException - if there is an error processing the XML value. The getCause()method of the exception may provide a more detailedexception, for example, if the stream does not contain validcharacters. An exception is thrown if the state is notreadable.
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




getSource
public synchronized Source getSource(Class clazz) throws SQLException(Code)
Returns a Source for reading the XML value designated by this SQLXML instance. Sources are used as inputs to XML parsers and XSLT transformers.

Sources for XML parsers will have namespace processing on by default. The systemID of the Source is implementation dependent.

The SQL XML object becomes not readable when this method is called and may also become not writable depending on implementation.

Note that SAX is a callback architecture, so a returned SAXSource should then be set with a content handler that will receive the SAX events from parsing. The content handler will receive callbacks based on the contents of the XML.

 SAXSource saxSource = sqlxml.getSource(SAXSource.class);
 XMLReader xmlReader = saxSource.getXMLReader();
 xmlReader.setContentHandler(myHandler);
 xmlReader.parse(saxSource.getInputSource());
 

Parameters:
  sourceClass - The class of the source, or null. If the class is null, avendor specifc Source implementation will be returned. Thefollowing classes are supported at a minimum:(MySQL returns a SAXSource if sourceClass == null)
javax.xml.transform.dom.DOMSource - returns a DOMSourcejavax.xml.transform.sax.SAXSource - returns a SAXSourcejavax.xml.transform.stax.StAXSource - returns a StAXSourcejavax.xml.transform.stream.StreamSource - returns a StreamSource
a Source for reading the XML value.
throws:
  SQLException - if there is an error processing the XML value or if thisfeature is not supported. The getCause() method of theexception may provide a more detailed exception, for example,if an XML parser exception occurs. An exception is thrown ifthe state is not readable.
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6



getString
public synchronized String getString() throws SQLException(Code)



isEmpty
public synchronized boolean isEmpty() throws SQLException(Code)



readerToString
protected String readerToString(Reader reader) throws SQLException(Code)



serializeAsCharacterStream
protected synchronized Reader serializeAsCharacterStream() throws SQLException(Code)



serializeAsString
protected synchronized String serializeAsString() throws SQLException(Code)



setBinaryStream
public synchronized OutputStream setBinaryStream() throws SQLException(Code)
Retrieves a stream that can be used to write the XML value that this SQLXML instance represents. The stream begins at position 0. The bytes of the stream are interpreted according to appendix F of the XML 1.0 specification The behavior of this method is the same as ResultSet.updateBinaryStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML.

The SQL XML object becomes not writeable when this method is called and may also become not readable depending on implementation. a stream to which data can be written.
throws:
  SQLException - if there is an error processing the XML value. An exceptionis thrown if the state is not writable.
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setCharacterStream
public synchronized Writer setCharacterStream() throws SQLException(Code)
Retrieves a stream to be used to write the XML value that this SQLXML instance represents. The format of this stream is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the stream is unicode. The behavior of this method is the same as ResultSet.updateCharacterStream() when the designated column of the ResultSet has a type java.sql.Types of SQLXML.

The SQL XML object becomes not writeable when this method is called and may also become not readable depending on implementation. a stream to which data can be written.
throws:
  SQLException - if there is an error processing the XML value. The getCause()method of the exception may provide a more detailedexception, for example, if the stream does not contain validcharacters. An exception is thrown if the state is notwritable.
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




setResult
public synchronized Result setResult(Class clazz) throws SQLException(Code)
Returns a Result for setting the XML value designated by this SQLXML instance.

The systemID of the Result is implementation dependent.

The SQL XML object becomes not writeable when this method is called and may also become not readable depending on implementation.

Note that SAX is a callback architecture and the returned SAXResult has a content handler assigned that will receive the SAX events based on the contents of the XML. Call the content handler with the contents of the XML document to assign the values.

 SAXResult saxResult = sqlxml.setResult(SAXResult.class);
 ContentHandler contentHandler = saxResult.getXMLReader().getContentHandler();
 contentHandler.startDocument();
 // set the XML elements and attributes into the result
 contentHandler.endDocument();
 

Parameters:
  resultClass - The class of the result, or null. If resultClass is null, avendor specific Result implementation will be returned. Thefollowing classes are supported at a minimum:
javax.xml.transform.dom.DOMResult - returns a DOMResultjavax.xml.transform.sax.SAXResult - returns a SAXResultjavax.xml.transform.stax.StAXResult - returns a StAXResultjavax.xml.transform.stream.StreamResult - returns a StreamResult
Returns a Result for setting the XML value.
throws:
  SQLException - if there is an error processing the XML value or if thisfeature is not supported. The getCause() method of theexception may provide a more detailed exception, for example,if an XML parser exception occurs. An exception is thrown ifthe state is not writable.
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6



setString
public synchronized void setString(String str) throws SQLException(Code)
Sets the XML value designated by this SQLXML instance to the given String representation. The format of this String is defined by org.xml.sax.InputSource, where the characters in the stream represent the unicode code points for XML according to section 2 and appendix B of the XML 1.0 specification. Although an encoding declaration other than unicode may be present, the encoding of the String is unicode. The behavior of this method is the same as ResultSet.updateString() when the designated column of the ResultSet has a type java.sql.Types of SQLXML.

The SQL XML object becomes not writeable when this method is called and may also become not readable depending on implementation.
Parameters:
  value - the XML value
throws:
  SQLException - if there is an error processing the XML value. The getCause()method of the exception may provide a more detailedexception, for example, if the stream does not contain validcharacters. An exception is thrown if the state is notwritable.
exception:
  SQLFeatureNotSupportedException - if the JDBC driver does not support this method
since:
   1.6




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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