com.sun.rowset.internal
Class WebRowSetXmlReader

java.lang.Object
  extended bycom.sun.rowset.internal.WebRowSetXmlReader
All Implemented Interfaces:
javax.sql.RowSetReader, java.io.Serializable, XmlReader

public class WebRowSetXmlReader
extends java.lang.Object
implements XmlReader, java.io.Serializable

An implementation of the XmlReader interface, which reads and parses an XML formatted WebRowSet object. This implementation uses an org.xml.sax.Parser object as its parser.

See Also:
Serialized Form

Constructor Summary
WebRowSetXmlReader()
           
 
Method Summary
 void readData(javax.sql.RowSetInternal caller)
          For code coverage purposes only right now
 void readXML(WebRowSet caller, java.io.InputStream iStream)
          Parses the given WebRowSet object, getting its input from the given java.io.InputStream object.
 void readXML(WebRowSet caller, java.io.Reader reader)
          Parses the given WebRowSet object, getting its input from the given java.io.Reader object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebRowSetXmlReader

public WebRowSetXmlReader()
Method Detail

readXML

public void readXML(WebRowSet caller,
                    java.io.Reader reader)
             throws java.sql.SQLException
Parses the given WebRowSet object, getting its input from the given java.io.Reader object. The parser will send notifications of parse events to the rowset's XmlReaderDocHandler, which will build the rowset as an XML document.

This method is called internally by the method WebRowSet.readXml.

If a parsing error occurs, the exception thrown will include information for locating the error in the original XML document.

Specified by:
readXML in interface XmlReader
Parameters:
caller - the WebRowSet object to be parsed, whose xmlReader field must contain a reference to this XmlReader object
reader - the java.io.Reader object from which the parser will get its input
Throws:
java.sql.SQLException - if a database access error occurs or this WebRowSetXmlReader object is not the reader for the given rowset
See Also:
XmlReaderContentHandler

readXML

public void readXML(WebRowSet caller,
                    java.io.InputStream iStream)
             throws java.sql.SQLException
Parses the given WebRowSet object, getting its input from the given java.io.InputStream object. The parser will send notifications of parse events to the rowset's XmlReaderDocHandler, which will build the rowset as an XML document.

Using streams is a much faster way than using java.io.Reader

This method is called internally by the method WebRowSet.readXml.

If a parsing error occurs, the exception thrown will include information for locating the error in the original XML document.

Parameters:
caller - the WebRowSet object to be parsed, whose xmlReader field must contain a reference to this XmlReader object
Throws:
java.sql.SQLException - if a database access error occurs or this WebRowSetXmlReader object is not the reader for the given rowset
See Also:
XmlReaderContentHandler

readData

public void readData(javax.sql.RowSetInternal caller)
For code coverage purposes only right now

Specified by:
readData in interface javax.sql.RowSetReader