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>XmlReader</code> interface, which 0N/A * reads and parses an XML formatted <code>WebRowSet</code> object. 0N/A * This implementation uses an <code>org.xml.sax.Parser</code> object 0N/A * Parses the given <code>WebRowSet</code> object, getting its input from 0N/A * the given <code>java.io.Reader</code> object. The parser will send 0N/A * notifications of parse events to the rowset's 0N/A * <code>XmlReaderDocHandler</code>, which will build the rowset as 0N/A * This method is called internally by the method 0N/A * <code>WebRowSet.readXml</code>. 0N/A * If a parsing error occurs, the exception thrown will include 0N/A * information for locating the error in the original XML document. 0N/A * @param caller the <code>WebRowSet</code> object to be parsed, whose 0N/A * <code>xmlReader</code> field must contain a reference to 0N/A * this <code>XmlReader</code> object 0N/A * @param reader the <code>java.io.Reader</code> object from which 0N/A * the parser will get its input 0N/A * @exception SQLException if a database access error occurs or 0N/A * this <code>WebRowSetXmlReader</code> object is not the 0N/A * reader for the given rowset 0N/A * @see XmlReaderContentHandler 0N/A // Crimson Parser(as in J2SE 1.4.1 is NOT able to handle 0N/A // Reader(s)(FileReader). 0N/A // But getting the file as a Stream works fine. So we are going to take 0N/A // the reader but send it as a InputStream to the parser. Note that this 0N/A // functionality needs to work against any parser 0N/A // Crimson(J2SE 1.4.x) / Xerces(J2SE 1.5.x). 0N/A // Will be here if trying to write beyond the RowSet limits 0N/A * Parses the given <code>WebRowSet</code> object, getting its input from 0N/A * the given <code>java.io.InputStream</code> object. The parser will send 0N/A * notifications of parse events to the rowset's 0N/A * <code>XmlReaderDocHandler</code>, which will build the rowset as 0N/A * Using streams is a much faster way than using <code>java.io.Reader</code> 0N/A * This method is called internally by the method 0N/A * <code>WebRowSet.readXml</code>. 0N/A * If a parsing error occurs, the exception thrown will include 0N/A * information for locating the error in the original XML document. 0N/A * @param caller the <code>WebRowSet</code> object to be parsed, whose 0N/A * <code>xmlReader</code> field must contain a reference to 0N/A * this <code>XmlReader</code> object 0N/A * @param iStream the <code>java.io.InputStream</code> object from which 0N/A * the parser will get its input 0N/A * @throws SQLException if a database access error occurs or 0N/A * this <code>WebRowSetXmlReader</code> object is not the 0N/A * reader for the given rowset 0N/A * @see XmlReaderContentHandler 0N/A // Will be here if trying to write beyond the RowSet limits 0N/A * For code coverage purposes only right now 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 .