Package Summary  Overview Summary


com.sun.rowset.internal
Class WebRowSetXmlWriter

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


All Implemented Interfaces:
java.io.Serializable, XmlWriter, 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
 booleanwriteData(RowSetInternal caller)
          Purely for code coverage purposes..
 voidwriteXML(WebRowSet caller, java.io.OutputStream oStream)
          Writes the given WebRowSet object as an XML document using the given java.io.OutputStream object.
 voidwriteXML(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 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:
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 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
oStream - the java.io.OutputStream object to which caller will be written
Throws:
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(RowSetInternal caller)
Purely for code coverage purposes..

Specified by:
writeData in interface RowSetWriter
Parameters:
caller - the RowSet object (1) that has implemented the RowSetInternal interface, (2) with which this writer is registered, and (3) that called this method internally
Returns:
true if the modified data was written; false if not, which will be the case if there is a conflict


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.