Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
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/api/InvalidCharHandler.java
package com.ctc.wstx.api; import java.io.IOException; /** * Simple converter interface designed to be used with stream writer property * {@link WstxOutputProperties#P_OUTPUT_INVALID_CHAR_HANDLER}. * The idea is that it should be easy to have a way to convert invalid * characters such as Ascii control characters into something that * is legal to include in XML content. This only allows for simple * char-by-char replacements, instead of something more advanced such * as escaping. If escaping is needed, check out * {@link org.codehaus.stax2.XMLOutputFactory2#P_TEXT_ESCAPER} instead. *<p> * Note about exceptions: choice of only allowing throwing of * {@link IOException}s is due to the way Woodstox stream writer * backend works; <code>XmlWriter</code> can only throw IOExceptions. */ public interface InvalidCharHandler { public char convertInvalidChar(int invalidChar) throws IOException; /** * This handler implementation just throws an exception for * all invalid characters encountered. It is the default handler * used if nothing else has been specified. */ public static class FailingHandler implements InvalidCharHandler { public final static int SURR1_FIRST = 0xD800; public final static int SURR1_LAST = 0xDBFF; public final static int SURR2_FIRST = 0xDC00; public final static int SURR2_LAST = 0xDFFF; private final static FailingHandler sInstance = new FailingHandler(); protected FailingHandler() { } public static FailingHandler getInstance() { return sInstance; } @Override public char convertInvalidChar(int c) throws IOException { /* 17-May-2006, TSa: Would really be useful if we could throw * XMLStreamExceptions; esp. to indicate actual output location. * However, this causes problem with methods that call us and * can only throw IOExceptions (when invoked via Writer proxy). * Need to figure out how to resolve this. */ if (c == 0) { throw new IOException("Invalid null character in text to output"); } if (c < ' ' || (c >= 0x7F && c <= 0x9F)) { String msg = "Invalid white space character (0x"+Integer.toHexString(c)+") in text to output (in xml 1.1, could output as a character entity)"; throw new IOException(msg); } if (c > 0x10FFFF) { throw new IOException("Illegal unicode character point (0x"+Integer.toHexString(c)+") to output; max is 0x10FFFF as per RFC 3629"); } /* Surrogate pair in non-quotable (not text or attribute value) * content, and non-unicode encoding (ISO-8859-x, Ascii)? */ if (c >= SURR1_FIRST && c <= SURR2_LAST) { throw new IOException("Illegal surrogate pair -- can only be output via character entities, which are not allowed in this content"); } throw new IOException("Invalid XML character (0x"+Integer.toHexString(c)+") in text to output"); } } /** * Alternative to the default handler, this handler converts all invalid * characters to the specified output character. That character will * not be further verified or modified by the stream writer. */ public static class ReplacingHandler implements InvalidCharHandler { final char mReplacementChar; public ReplacingHandler(char c) { mReplacementChar = c; } @Override public char convertInvalidChar(int c) throws IOException { return mReplacementChar; } } }
⏎ com/ctc/wstx/api/InvalidCharHandler.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, 9589👍, 0💬
Popular Posts:
How to run "jar" command from JDK tools.jar file? "jar" is the JAR (Java Archive) file management co...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...
JDK 11 jdk.internal.JVM Stat.jmod is the JMOD file for JDK 11 Internal Jvmstat module. JDK 11 Intern...
Jaxen, Release 1.1.1, is an open source XPath library written in Java. It is adaptable to many diffe...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...