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:
Woodstox 6.4.0 - Source Code Files
Woodstox 6.4.0 Source Code Files are provided at the Woodstox GitHub Website.
You can download them from the "src/main/java" folder.
You can also browse Woodstox Source Code files below:
✍: FYIcenter
⏎ com/ctc/wstx/compat/QNameCreator.java
package com.ctc.wstx.compat;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
/**
* Helper class used to solve [WSTX-174]: some older AppServers were
* shipped with incompatible version of QName class, which is missing
* the 3 argument constructor. To address this, we'll use bit of
* ClassLoader hacker to gracefully (?) downgrade to using 2 arg
* alternatives if necessary.
*<p>
* Note: choice of java.util.logging logging is only based on the
* fact that it is guaranteed to be present (we have JDK 1.4 baseline
* requirement) so that we do not add external dependencies.
* It is not a recommendation for using JUL per se; most users would
* do well to just use slf4j or log4j directly instead.
*
* @author Tatu Saloranta
*
* @since 3.2.8
*/
public final class QNameCreator
{
/**
* Creator object that creates QNames using proper 3-arg constructor.
* If dynamic class loading fails
*/
private final static Helper _helper;
static {
Helper h = null;
try {
// Not sure where it'll fail, constructor or create...
Helper h0 = new Helper();
/*QName n =*/ h0.create("elem", "http://dummy", "ns");
h = h0;
} catch (Throwable t) {
String msg = "Could not construct QNameCreator.Helper; assume 3-arg QName constructor not available and use 2-arg method instead. Problem: "+t.getMessage();
try {
Logger.getLogger("com.ctc.wstx.compat.QNameCreator").warning(msg);
} catch (Throwable t2) { // just in case JUL craps out...
System.err.println("ERROR: failed to log error using Logger (problem "+t.getMessage()+"), original problem: "+msg);
}
}
_helper = h;
}
public static QName create(String uri, String localName, String prefix)
{
if (_helper == null) { // can't use 3-arg constructor; but 2-arg will be there
return new QName(uri, localName);
}
return _helper.create(uri, localName, prefix);
}
/**
* Helper class used to encapsulate calls to the missing method.
*/
private final static class Helper
{
public Helper() { }
public QName create(String localName, String nsURI, String prefix)
{
return new QName(localName, nsURI, prefix);
}
}
}
⏎ com/ctc/wstx/compat/QNameCreator.java
Or download all of them as a single archive file:
File name: woodstox-core-6.4.0-fyi.zip File size: 552992 bytes Release date: 2022-10-25 Download
⇒ woodstox-core-6.4.0.jar - Woodstox Core 6.4.0
⇐ What Is Woodstox XML Processing
2023-01-29, ≈63🔥, 0💬
Popular Posts:
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
maven-model-builder-3.5. 4.jaris the JAR file for Apache Maven 3.5.4 Model Builder module. Apache Ma...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module. JDK 11 Management module ...
commons-io-2.6-sources.j aris the source JAR file for Apache Commons IO 2.6, which is a library of u...