Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 java.sql.rowset.jmod - SQL Rowset Module
JDK 17 java.sql.rowset.jmod is the JMOD file for JDK 17 SQL Rowset module.
JDK 17 SQL Rowset module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.sql.rowset.jmod.
JDK 17 SQL Rowset module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 SQL Rowset module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.sql.rowset.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/rowset/internal/WebRowSetXmlReader.java
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.rowset.internal;
import java.sql.*;
import javax.sql.*;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;
import com.sun.rowset.*;
import java.text.MessageFormat;
import javax.sql.rowset.*;
import javax.sql.rowset.spi.*;
/**
* An implementation of the <code>XmlReader</code> interface, which
* reads and parses an XML formatted <code>WebRowSet</code> object.
* This implementation uses an <code>org.xml.sax.Parser</code> object
* as its parser.
*/
public class WebRowSetXmlReader implements XmlReader, Serializable {
private JdbcRowSetResourceBundle resBundle;
public WebRowSetXmlReader(){
try {
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
} catch(IOException ioe) {
throw new RuntimeException(ioe);
}
}
/**
* Parses the given <code>WebRowSet</code> object, getting its input from
* the given <code>java.io.Reader</code> object. The parser will send
* notifications of parse events to the rowset's
* <code>XmlReaderDocHandler</code>, which will build the rowset as
* an XML document.
* <P>
* This method is called internally by the method
* <code>WebRowSet.readXml</code>.
* <P>
* If a parsing error occurs, the exception thrown will include
* information for locating the error in the original XML document.
*
* @param caller the <code>WebRowSet</code> object to be parsed, whose
* <code>xmlReader</code> field must contain a reference to
* this <code>XmlReader</code> object
* @param reader the <code>java.io.Reader</code> object from which
* the parser will get its input
* @exception SQLException if a database access error occurs or
* this <code>WebRowSetXmlReader</code> object is not the
* reader for the given rowset
* @see XmlReaderContentHandler
*/
public void readXML(WebRowSet caller, java.io.Reader reader) throws SQLException {
try {
// Crimson Parser(as in J2SE 1.4.1 is NOT able to handle
// Reader(s)(FileReader).
//
// But getting the file as a Stream works fine. So we are going to take
// the reader but send it as a InputStream to the parser. Note that this
// functionality needs to work against any parser
// Crimson(J2SE 1.4.x) / Xerces(J2SE 1.5.x).
InputSource is = new InputSource(reader);
DefaultHandler dh = new XmlErrorHandler();
XmlReaderContentHandler hndr = new XmlReaderContentHandler((RowSet)caller);
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
SAXParser parser = factory.newSAXParser() ;
parser.setProperty(
"http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
XMLReader reader1 = parser.getXMLReader() ;
reader1.setEntityResolver(new XmlResolver());
reader1.setContentHandler(hndr);
reader1.setErrorHandler(dh);
reader1.parse(is);
} catch (SAXParseException err) {
System.out.println (MessageFormat.format(resBundle.handleGetObject("wrsxmlreader.parseerr").toString(), new Object[]{ err.getMessage (), err.getLineNumber(), err.getSystemId()}));
err.printStackTrace();
throw new SQLException(err.getMessage());
} catch (SAXException e) {
Exception x = e;
if (e.getException () != null)
x = e.getException();
x.printStackTrace ();
throw new SQLException(x.getMessage());
}
// Will be here if trying to write beyond the RowSet limits
catch (ArrayIndexOutOfBoundsException aie) {
throw new SQLException(resBundle.handleGetObject("wrsxmlreader.invalidcp").toString());
}
catch (Throwable e) {
throw new SQLException(MessageFormat.format(resBundle.handleGetObject("wrsxmlreader.readxml").toString() , e.getMessage()));
}
}
/**
* Parses the given <code>WebRowSet</code> object, getting its input from
* the given <code>java.io.InputStream</code> object. The parser will send
* notifications of parse events to the rowset's
* <code>XmlReaderDocHandler</code>, which will build the rowset as
* an XML document.
* <P>
* Using streams is a much faster way than using <code>java.io.Reader</code>
* <P>
* This method is called internally by the method
* <code>WebRowSet.readXml</code>.
* <P>
* If a parsing error occurs, the exception thrown will include
* information for locating the error in the original XML document.
*
* @param caller the <code>WebRowSet</code> object to be parsed, whose
* <code>xmlReader</code> field must contain a reference to
* this <code>XmlReader</code> object
* @param iStream the <code>java.io.InputStream</code> object from which
* the parser will get its input
* @throws SQLException if a database access error occurs or
* this <code>WebRowSetXmlReader</code> object is not the
* reader for the given rowset
* @see XmlReaderContentHandler
*/
public void readXML(WebRowSet caller, java.io.InputStream iStream) throws SQLException {
try {
InputSource is = new InputSource(iStream);
DefaultHandler dh = new XmlErrorHandler();
XmlReaderContentHandler hndr = new XmlReaderContentHandler((RowSet)caller);
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
SAXParser parser = factory.newSAXParser() ;
parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
"http://www.w3.org/2001/XMLSchema");
XMLReader reader1 = parser.getXMLReader() ;
reader1.setEntityResolver(new XmlResolver());
reader1.setContentHandler(hndr);
reader1.setErrorHandler(dh);
reader1.parse(is);
} catch (SAXParseException err) {
System.out.println (MessageFormat.format(resBundle.handleGetObject("wrsxmlreader.parseerr").toString(), new Object[]{err.getLineNumber(), err.getSystemId() }));
System.out.println(" " + err.getMessage ());
err.printStackTrace();
throw new SQLException(err.getMessage());
} catch (SAXException e) {
Exception x = e;
if (e.getException () != null)
x = e.getException();
x.printStackTrace ();
throw new SQLException(x.getMessage());
}
// Will be here if trying to write beyond the RowSet limits
catch (ArrayIndexOutOfBoundsException aie) {
throw new SQLException(resBundle.handleGetObject("wrsxmlreader.invalidcp").toString());
}
catch (Throwable e) {
throw new SQLException(MessageFormat.format(resBundle.handleGetObject("wrsxmlreader.readxml").toString() , e.getMessage()));
}
}
/**
* For code coverage purposes only right now
*
*/
public void readData(RowSetInternal caller) {
}
/**
* This method re populates the resBundle
* during the deserialization process
*
*/
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
// Default state initialization happens here
ois.defaultReadObject();
// Initialization of transient Res Bundle happens here .
try {
resBundle = JdbcRowSetResourceBundle.getJdbcRowSetResourceBundle();
} catch(IOException ioe) {
throw new RuntimeException(ioe);
}
}
static final long serialVersionUID = -9127058392819008014L;
}
⏎ com/sun/rowset/internal/WebRowSetXmlReader.java
Or download all of them as a single archive file:
File name: java.sql.rowset-17.0.5-src.zip File size: 343193 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.transaction.xa.jmod - Transaction XA Module
2023-10-27, ≈26🔥, 0💬
Popular Posts:
What is the sax\Counter.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 inst...
JDK 6 tools.jar is the JAR file for JDK 6 tools. It contains Java classes to support different JDK t...
JUnit Source Code Files are provided in the source package file, junit-4.13.2-sources.jar .You can b...
commons-fileupload-1.3.3 -sources.jaris the source JAR file for Apache Commons FileUpload 1.3., whic...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...