2741N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * An implementation of the <code>XmlWriter</code> interface, which writes a 0N/A * <code>WebRowSet</code> object to an output stream as an XML document. 0N/A * The <code>java.io.Writer</code> object to which this <code>WebRowSetXmlWriter</code> 0N/A * object will write when its <code>writeXML</code> method is called. The value 0N/A * for this field is set with the <code>java.io.Writer</code> object given 0N/A * as the second argument to the <code>writeXML</code> method. 0N/A * The <code>java.util.Stack</code> object that this <code>WebRowSetXmlWriter</code> 0N/A * object will use for storing the tags to be used for writing the calling 0N/A * <code>WebRowSet</code> object as an XML document. 0N/A * Writes the given <code>WebRowSet</code> object as an XML document 0N/A * using the given <code>java.io.Writer</code> object. The XML document 0N/A * will include the <code>WebRowSet</code> object's data, metadata, and 0N/A * properties. If a data value has been updated, that information is also 0N/A * This method is called by the <code>XmlWriter</code> object that is 0N/A * referenced in the calling <code>WebRowSet</code> object's 0N/A * <code>xmlWriter</code> field. The <code>XmlWriter.writeXML</code> 0N/A * method passes to this method the arguments that were supplied to it. 0N/A * @param caller the <code>WebRowSet</code> object to be written; must 0N/A * be a rowset for which this <code>WebRowSetXmlWriter</code> object 0N/A * @param wrt the <code>java.io.Writer</code> object to which 0N/A * <code>caller</code> will be written 0N/A * @exception SQLException if a database access error occurs or 0N/A * this <code>WebRowSetXmlWriter</code> object is not the writer 0N/A * for the given rowset 0N/A * @see XmlWriter#writeXML 0N/A // create a new stack for tag checking. 0N/A * Writes the given <code>WebRowSet</code> object as an XML document 0N/A * using the given <code>java.io.OutputStream</code> object. The XML document 0N/A * will include the <code>WebRowSet</code> object's data, metadata, and 0N/A * properties. If a data value has been updated, that information is also 0N/A * Using stream is a faster way than using <code>java.io.Writer<code/> 0N/A * This method is called by the <code>XmlWriter</code> object that is 0N/A * referenced in the calling <code>WebRowSet</code> object's 0N/A * <code>xmlWriter</code> field. The <code>XmlWriter.writeXML</code> 0N/A * method passes to this method the arguments that were supplied to it. 0N/A * @param caller the <code>WebRowSet</code> object to be written; must 0N/A * be a rowset for which this <code>WebRowSetXmlWriter</code> object 0N/A * @param oStream the <code>java.io.OutputStream</code> object to which 0N/A * <code>caller</code> will be written 0N/A * @throws SQLException if a database access error occurs or 0N/A * this <code>WebRowSetXmlWriter</code> object is not the writer 0N/A * for the given rowset 0N/A * @see XmlWriter#writeXML 0N/A // create a new stack for tag checking. 0N/A * @exception SQLException if a database access error occurs 0N/A * @exception SQLException if a database access error occurs 0N/A // it may be the case that fetch direction has not been set 0N/A // in that case it will throw a SQLException. 0N/A // To avoid that catch it here 0N/A //Changed to beginSection and endSection for maps for proper indentation 0N/A // Remove the string after "@xxxx" 0N/A // before writing it to the xml file. 0N/A * @exception SQLException if a database access error occurs 0N/A * @exception SQLException if a database access error occurs 0N/A //Need to take care of BLOB, CLOB, Array, Ref here 0N/A * This begins a new tag with a indent 0N/A // store the current tag 0N/A * This closes a tag started by beginTag with a indent 0N/A // get the current tag and write it out 0N/A // get the current tag and write it out 0N/A // store the current tag 0N/A // get the current tag and write it out 0N/A // write an emptyTag 0N/A // add the tag to stack 0N/A * Purely for code coverage purposes.. 0N/A * This function has been added for the processing of special characters 0N/A * lik <,>,'," and & in the data to be serialized. These have to be taken 0N/A * of specifically or else there will be parsing error while trying to read 0N/A * the contents of the XML file. 2741N/A * This method re populates the resBundle 2741N/A * during the deserialization process 2741N/A // Default state initialization happens here 2741N/A // Initialization of transient Res Bundle happens here .