Path: blob/master/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/XmlWriter.java
40948 views
/*1* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.sql.rowset.spi;2627import java.sql.SQLException;28import java.io.Writer;2930import javax.sql.RowSetWriter;31import javax.sql.rowset.*;3233/**34* A specialized interface that facilitates an extension of the35* <code>SyncProvider</code> abstract class for XML orientated36* synchronization providers.37* <p>38* <code>SyncProvider</code> implementations that supply XML data writer39* capabilities such as output XML stream capabilities can implement this40* interface to provide standard <code>XmlWriter</code> objects to41* <code>WebRowSet</code> implementations.42* <P>43* Writing a <code>WebRowSet</code> object includes printing the44* rowset's data, metadata, and properties, all with the45* appropriate XML tags.46*47* @since 1.548*/49public interface XmlWriter extends RowSetWriter {5051/**52* Writes the given <code>WebRowSet</code> object to the specified53* <code>java.io.Writer</code> output stream as an XML document.54* This document includes the rowset's data, metadata, and properties55* plus the appropriate XML tags.56* <P>57* The <code>caller</code> parameter must be a <code>WebRowSet</code>58* object whose <code>XmlWriter</code> field contains a reference to59* this <code>XmlWriter</code> object.60*61* @param caller the <code>WebRowSet</code> instance to be written,62* for which this <code>XmlWriter</code> object is the writer63* @param writer the <code>java.io.Writer</code> object that serves64* as the output stream for writing <code>caller</code> as65* an XML document66* @throws SQLException if a database access error occurs or67* this <code>XmlWriter</code> object is not the writer68* for the given <code>WebRowSet</code> object69*/70public void writeXML(WebRowSet caller, java.io.Writer writer)71throws SQLException;72737475}767778