Package Summary  Overview Summary


com.sun.rowset.internal
Class WebRowSetXmlReader

java.lang.Object
  extended by com.sun.rowset.internal.WebRowSetXmlReader


All Implemented Interfaces:
java.io.Serializable, XmlReader, RowSetReader

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
 voidreadData(RowSetInternal caller)
          For code coverage purposes only right now
 voidreadXML(WebRowSet caller, java.io.InputStream iStream)
          Parses the given WebRowSet object, getting its input from the given java.io.InputStream object.
 voidreadXML(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 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:
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 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
iStream - the java.io.InputStream object from which the parser will get its input
Throws:
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(RowSetInternal caller)
For code coverage purposes only right now

Specified by:
readData in interface RowSetReader
Parameters:
caller - the RowSet object (1) that has implemented the RowSetInternal interface, (2) with which this reader is registered, and (3) whose execute method called this reader


Java is a trademark or registered trademark of Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A All Rights Reserved.