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 11 java.xml.jmod - XML Module
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module.
JDK 11 XML module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.xml.jmod.
JDK 11 XML module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 XML module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.xml.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/xml/internal/stream/events/DummyEvent.java
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.xml.internal.stream.events ;
import java.io.IOException;
import java.io.Writer;
import javax.xml.stream.events.XMLEvent;
import javax.xml.stream.events.Characters;
import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;
import javax.xml.namespace.QName;
import javax.xml.stream.Location;
import javax.xml.stream.XMLStreamException;
/** DummyEvent is an abstract class. It provides functionality for most of the
* function of XMLEvent.
*
* @author Neeraj Bajaj Sun Microsystems,Inc.
* @author K.Venugopal Sun Microsystems,Inc.
*
*/
public abstract class DummyEvent implements XMLEvent {
// Make sure that getLocation() never returns null. Instead, return this dummy location
// that indicates "nowhere" as effectively as possible.
private static DummyLocation nowhere = new DummyLocation();
/* Event type this event corresponds to */
private int fEventType;
protected Location fLocation = (Location) nowhere;
public DummyEvent() {
}
public DummyEvent(int i) {
fEventType = i;
}
public int getEventType() {
return fEventType;
}
protected void setEventType(int eventType){
fEventType = eventType;
}
public boolean isStartElement() {
return fEventType == XMLEvent.START_ELEMENT;
}
public boolean isEndElement() {
return fEventType == XMLEvent.END_ELEMENT;
}
public boolean isEntityReference() {
return fEventType == XMLEvent.ENTITY_REFERENCE;
}
public boolean isProcessingInstruction() {
return fEventType == XMLEvent.PROCESSING_INSTRUCTION;
}
public boolean isCharacterData() {
return fEventType == XMLEvent.CHARACTERS;
}
public boolean isStartDocument() {
return fEventType == XMLEvent.START_DOCUMENT;
}
public boolean isEndDocument() {
return fEventType == XMLEvent.END_DOCUMENT;
}
public Location getLocation(){
return fLocation;
}
void setLocation(Location loc){
if (loc == null) {
fLocation = nowhere;
} else {
fLocation = loc;
}
}
/** Returns this event as Characters, may result in
* a class cast exception if this event is not Characters.
*/
public Characters asCharacters() {
return (Characters)this;
}
/** Returns this event as an end element event, may result in
* a class cast exception if this event is not a end element.
*/
public EndElement asEndElement() {
return (EndElement)this;
}
/** Returns this event as a start element event, may result in
* a class cast exception if this event is not a start element.
*/
public StartElement asStartElement() {
return (StartElement)this;
}
/** This method is provided for implementations to provide
* optional type information about the associated event.
* It is optional and will return null if no information
* is available.
*/
public QName getSchemaType() {
//Base class will take care of providing extra information about this event.
return null;
}
/** A utility function to check if this event is an Attribute.
* @see Attribute
*/
public boolean isAttribute() {
return fEventType == XMLEvent.ATTRIBUTE;
}
/** A utility function to check if this event is Characters.
* @see Characters
*/
public boolean isCharacters() {
return fEventType == XMLEvent.CHARACTERS;
}
/** A utility function to check if this event is a Namespace.
* @see Namespace
*/
public boolean isNamespace() {
return fEventType == XMLEvent.NAMESPACE;
}
/** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
* No indentation or whitespace should be outputted.
*
* Any user defined event type SHALL have this method
* called when being written to on an output stream.
* Built in Event types MUST implement this method,
* but implementations MAY choose not call these methods
* for optimizations reasons when writing out built in
* Events to an output stream.
* The output generated MUST be equivalent in terms of the
* infoset expressed.
*
* @param writer The writer that will output the data
* @throws XMLStreamException if there is a fatal error writing the event
*/
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException {
try {
writeAsEncodedUnicodeEx(writer);
} catch (IOException e) {
throw new XMLStreamException(e);
}
}
/** Helper method in order to expose IOException.
* @param writer The writer that will output the data
* @throws XMLStreamException if there is a fatal error writing the event
* @throws IOException if there is an IO error
*/
protected abstract void writeAsEncodedUnicodeEx(Writer writer)
throws IOException, XMLStreamException;
/** Helper method to escape < > & for characters event and
* quotes, lt and amps for Entity
*/
protected void charEncode(Writer writer, String data)
throws IOException
{
if (data == null || data == "") return;
int i = 0, start = 0;
int len = data.length();
loop:
for (; i < len; ++i) {
switch (data.charAt(i)) {
case '<':
writer.write(data, start, i - start);
writer.write("<");
start = i + 1;
break;
case '&':
writer.write(data, start, i - start);
writer.write("&");
start = i + 1;
break;
case '>':
writer.write(data, start, i - start);
writer.write(">");
start = i + 1;
break;
case '"':
writer.write(data, start, i - start);
writer.write(""");
start = i + 1;
break;
}
}
// Write any pending data
writer.write(data, start, len - start);
}
static class DummyLocation implements Location {
public DummyLocation() {
}
public int getCharacterOffset() {
return -1;
}
public int getColumnNumber() {
return -1;
}
public int getLineNumber() {
return -1;
}
public String getPublicId() {
return null;
}
public String getSystemId() {
return null;
}
}
}
⏎ com/sun/xml/internal/stream/events/DummyEvent.java
Or download all of them as a single archive file:
File name: java.xml-11.0.1-src.zip File size: 4876106 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.xml.crypto.jmod - XML Crypto Module
2020-08-25, ≈690🔥, 0💬
Popular Posts:
JDK 17 jdk.jpackage.jmod is the JMOD file for JDK 17 JPackage tool, which can be invoked by the "jpa...
JDK 17 jdk.jconsole.jmod is the JMOD file for JDK 17 JConsole tool, which can be invoked by the "jco...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
Where to get the Java source code for Connector/J 8.0 User Impl module? Java source code files for C...
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...