KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > sql > rowset > spi > XmlWriter


1 /*
2  * @(#)XmlWriter.java 1.3 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.sql.rowset.spi;
9
10 import java.sql.SQLException JavaDoc;
11 import java.io.Writer JavaDoc;
12
13 import javax.sql.RowSetWriter JavaDoc;
14 import javax.sql.rowset.*;
15
16 /**
17  * A specialized interface that facilitates an extension of the
18  * <code>SyncProvider</code> abstract class for XML orientated
19  * synchronization providers.
20  * <p>
21  * <code>SyncProvider</code> implementations that supply XML data writer
22  * capabilities such as output XML stream capabilities can implement this
23  * interface to provider standard <code>XmlWriter</code> objects to
24  * <code>WebRowSet</code> implementations.
25  * <P>
26  * Writing a <code>WebRowSet</code> object includes printing the
27  * rowset's data, metadata, and properties, all with the
28  * appropriate XML tags.
29  */

30 public interface XmlWriter extends RowSetWriter JavaDoc {
31
32   /**
33    * Writes the given <code>WebRowSet</code> object to the specified
34    * <code>java.io.Writer</code> output stream as an XML document.
35    * This document includes the rowset's data, metadata, and properties
36    * plus the appropriate XML tags.
37    * <P>
38    * The <code>caller</code> parameter must be a <code>WebRowSet</code>
39    * object whose <code>XmlWriter</code> field contains a reference to
40    * this <code>XmlWriter</code> object.
41    *
42    * @param caller the <code>WebRowSet</code> instance to be written,
43    * for which this <code>XmlWriter</code> object is the writer
44    * @param writer the <code>java.io.Writer</code> object that serves
45    * as the output stream for writing <code>caller</code> as
46    * an XML document
47    * @throws SQLException if a database access error occurs or
48    * this <code>XmlWriter</code> object is not the writer
49    * for the given <code>WebRowSet</code> object
50    */

51   public void writeXML(WebRowSet caller, java.io.Writer JavaDoc writer)
52     throws SQLException JavaDoc;
53
54
55   
56 }
57
Popular Tags