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:
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/org/apache/xml/internal/serialize/EncodingInfo.java
/* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.sun.org.apache.xml.internal.serialize; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; import com.sun.org.apache.xerces.internal.util.EncodingMap; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; /** * This class represents an encoding. * * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation * is replaced by that of Xalan. Main class * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. */ @Deprecated public class EncodingInfo { // name of encoding as registered with IANA; // preferably a MIME name, but aliases are fine too. String ianaName; String javaName; int lastPrintable; // The CharsetEncoder with which we test unusual characters. CharsetEncoder fCharsetEncoder = null; // Is the charset encoder usable or available. boolean fHaveTriedCharsetEncoder = false; /** * Creates new <code>EncodingInfo</code> instance. */ public EncodingInfo(String ianaName, String javaName, int lastPrintable) { this.ianaName = ianaName; this.javaName = EncodingMap.getIANA2JavaMapping(ianaName); this.lastPrintable = lastPrintable; } /** * Returns a MIME charset name of this encoding. */ public String getIANAName() { return this.ianaName; } /** * Returns a writer for this encoding based on * an output stream. * * @return A suitable writer * @exception UnsupportedEncodingException There is no convertor * to support this encoding */ public Writer getWriter(OutputStream output) throws UnsupportedEncodingException { // this should always be true! if (javaName != null) return new OutputStreamWriter(output, javaName); javaName = EncodingMap.getIANA2JavaMapping(ianaName); if(javaName == null) // use UTF-8 as preferred encoding return new OutputStreamWriter(output, "UTF8"); return new OutputStreamWriter(output, javaName); } /** * Checks whether the specified character is printable or not in this encoding. * * @param ch a code point (0-0x10ffff) */ public boolean isPrintable(char ch) { if (ch <= this.lastPrintable) { return true; } return isPrintable0(ch); } /** * Checks whether the specified character is printable or not in this encoding. * This method accomplishes this using a java.nio.CharsetEncoder. If NIO isn't * available it will attempt use a sun.io.CharToByteConverter. * * @param ch a code point (0-0x10ffff) */ private boolean isPrintable0(char ch) { // Attempt to get a CharsetEncoder for this encoding. if (fCharsetEncoder == null && !fHaveTriedCharsetEncoder) { // try and create the CharsetEncoder try { Charset charset = java.nio.charset.Charset.forName(javaName); if (charset.canEncode()) { fCharsetEncoder = charset.newEncoder(); } // This charset cannot be used for encoding, don't try it again... else { fHaveTriedCharsetEncoder = true; } } catch (Exception e) { // don't try it again... fHaveTriedCharsetEncoder = true; } } // Attempt to use the CharsetEncoder to determine whether the character is printable. if (fCharsetEncoder != null) { try { return fCharsetEncoder.canEncode(ch); } catch (Exception e) { // obviously can't use this charset encoder; possibly a JDK bug fCharsetEncoder = null; fHaveTriedCharsetEncoder = false; } } return false; } // is this an encoding name recognized by this JDK? // if not, will throw UnsupportedEncodingException public static void testJavaEncodingName(String name) throws UnsupportedEncodingException { final byte [] bTest = {(byte)'v', (byte)'a', (byte)'l', (byte)'i', (byte)'d'}; String s = new String(bTest, name); } }
⏎ com/sun/org/apache/xml/internal/serialize/EncodingInfo.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, 177423👍, 0💬
Popular Posts:
The JMX technology provides the tools for building distributed, Web-based, modular and dynamic solut...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
JSP(tm) Standard Tag Library 1.1 implementation - Jakarta Taglibs hosts the Standard Taglib 1.1, an ...
JDK 11 java.xml.crypto.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) Crypto modu...
Oracle Business Intelligence (BI) Beans enables developers to productively build business intelligen...