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.base.jmod - Base Module
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module.
JDK 11 Base module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.base.jmod.
JDK 11 Base module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Base module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/util/xml/impl/XMLWriter.java
/* * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.internal.util.xml.impl; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; import java.io.Writer; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; import jdk.internal.util.xml.XMLStreamException; /** * * @author huizwang */ public class XMLWriter { private Writer _writer; /** * In some cases, this charset encoder is used to determine if a char is * encodable by underlying writer. For example, an 8-bit char from the * extended ASCII set is not encodable by 7-bit ASCII encoder. Unencodable * chars are escaped using XML numeric entities. */ private CharsetEncoder _encoder = null; public XMLWriter(OutputStream os, String encoding, Charset cs) throws XMLStreamException { _encoder = cs.newEncoder(); try { _writer = getWriter(os, encoding, cs); } catch (UnsupportedEncodingException ex) { throw new XMLStreamException(ex); } } public boolean canEncode(char ch) { if (_encoder == null) { return false; } return (_encoder.canEncode(ch)); } public void write(String s) throws XMLStreamException { try { _writer.write(s.toCharArray()); // _writer.write(s.getBytes(Charset.forName(_encoding))); } catch (IOException e) { throw new XMLStreamException("I/O error", e); } } public void write(String str, int off, int len) throws XMLStreamException { try { _writer.write(str, off, len); } catch (IOException e) { throw new XMLStreamException("I/O error", e); } } public void write(char[] cbuf, int off, int len) throws XMLStreamException { try { _writer.write(cbuf, off, len); } catch (IOException e) { throw new XMLStreamException("I/O error", e); } } void write(int b) throws XMLStreamException { try { _writer.write(b); } catch (IOException e) { throw new XMLStreamException("I/O error", e); } } void flush() throws XMLStreamException { try { _writer.flush(); } catch (IOException ex) { throw new XMLStreamException(ex); } } void close() throws XMLStreamException { try { _writer.close(); } catch (IOException ex) { throw new XMLStreamException(ex); } } private void nl() throws XMLStreamException { String lineEnd = System.lineSeparator(); try { _writer.write(lineEnd); } catch (IOException e) { throw new XMLStreamException("I/O error", e); } } /** * Returns a writer for the specified encoding based on an output stream. * * @param output The output stream * @param encoding The encoding * @return A suitable writer * @throws UnsupportedEncodingException There is no convertor to support * this encoding */ private Writer getWriter(OutputStream output, String encoding, Charset cs) throws XMLStreamException, UnsupportedEncodingException { if (cs != null) { return (new OutputStreamWriter(new BufferedOutputStream(output), cs)); } return new OutputStreamWriter(new BufferedOutputStream(output), encoding); } }
⏎ jdk/internal/util/xml/impl/XMLWriter.java
Or download all of them as a single archive file:
File name: java.base-11.0.1-src.zip File size: 8740354 bytes Release date: 2018-11-04 Download
2020-05-29, 207132👍, 0💬
Popular Posts:
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
Apache Neethi provides general framework for the programmers to use WS Policy. It is compliant with ...
What Is fop.jar? I got it from the fop-2.7-bin.zip. fop.jar in fop-2.7-bin.zip is the JAR file for F...
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module. JDK 11 JFR module compiled class files a...