com.sun.rowset.internal
Class WebRowSetXmlWriter

java.lang.Object
  extended by com.sun.rowset.internal.WebRowSetXmlWriter
All Implemented Interfaces:
java.io.Serializable, XmlWriter, javax.sql.RowSetWriter

public class WebRowSetXmlWriter
extends java.lang.Object
implements XmlWriter, java.io.Serializable

An implementation of the XmlWriter interface, which writes a WebRowSet object to an output stream as an XML document.

See Also:
Serialized Form

Constructor Summary
WebRowSetXmlWriter()
           
 
Method Summary
 boolean writeData(javax.sql.RowSetInternal caller)
          Purely for code coverage purposes..
 void writeXML(WebRowSet caller, java.io.OutputStream oStream)
          Writes the given WebRowSet object as an XML document using the given java.io.OutputStream object.
 void writeXML(WebRowSet caller, java.io.Writer wrt)
          Writes the given WebRowSet object as an XML document using the given java.io.Writer object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebRowSetXmlWriter

public WebRowSetXmlWriter()
Method Detail

writeXML

public void writeXML(WebRowSet caller,
                     java.io.Writer wrt)
              throws java.sql.SQLException
Writes the given WebRowSet object as an XML document using the given java.io.Writer object. The XML document will include the WebRowSet object's data, metadata, and properties. If a data value has been updated, that information is also included.

This method is called by the XmlWriter object that is referenced in the calling WebRowSet object's xmlWriter field. The XmlWriter.writeXML method passes to this method the arguments that were supplied to it.

Specified by:
writeXML in interface XmlWriter
Parameters:
caller - the WebRowSet object to be written; must be a rowset for which this WebRowSetXmlWriter object is the writer
wrt - the java.io.Writer object to which caller will be written
Throws:
java.sql.SQLException - if a database access error occurs or this WebRowSetXmlWriter object is not the writer for the given rowset
See Also:
XmlWriter.writeXML(javax.sql.rowset.WebRowSet, java.io.Writer)

writeXML

public void writeXML(WebRowSet caller,
                     java.io.OutputStream oStream)
              throws java.sql.SQLException
Writes the given WebRowSet object as an XML document using the given java.io.OutputStream object. The XML document will include the WebRowSet object's data, metadata, and properties. If a data value has been updated, that information is also included.

Using stream is a faster way than using java.io.Writer This method is called by the XmlWriter object that is referenced in the calling WebRowSet object's xmlWriter field. The XmlWriter.writeXML method passes to this method the arguments that were supplied to it.

Parameters:
caller - the WebRowSet object to be written; must be a rowset for which this WebRowSetXmlWriter object is the writer
wrt - the java.io.OutputStream object to which caller will be written
Throws:
java.sql.SQLException - if a database access error occurs or this WebRowSetXmlWriter object is not the writer for the given rowset
See Also:
XmlWriter.writeXML(javax.sql.rowset.WebRowSet, java.io.Writer)

writeData

public boolean writeData(javax.sql.RowSetInternal caller)
Purely for code coverage purposes..

Specified by:
writeData in interface javax.sql.RowSetWriter