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 17 jdk.javadoc.jmod - Java Document Tool
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool,
which can be invoked by the "javadoc" command.
JDK 17 Java Document tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.javadoc.jmod.
JDK 17 Java Document tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Java Document tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.javadoc.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/javadoc/internal/doclets/formats/html/markup/Entity.java
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.javadoc.internal.doclets.formats.html.markup;
import jdk.javadoc.internal.doclets.toolkit.Content;
import java.io.IOException;
import java.io.Writer;
/**
* A representation of HTML entities.
*/
public class Entity extends Content {
public static final Entity LESS_THAN = new Entity("<");
public static final Entity GREATER_THAN = new Entity(">");
public static final Entity AMPERSAND = new Entity("&");
public static final Entity NO_BREAK_SPACE = new Entity(" ");
public final String text;
private Entity(String text) {
this.text = text;
}
@Override
public boolean write(Writer writer, boolean atNewline) throws IOException {
writer.write(text);
return false;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public int charCount() {
return 1;
}
/**
* Escapes the special HTML characters in a given string using the appropriate
* entities.
*
* @param s the string to escape
* @return the string with all of the HTML characters escaped
*/
static String escapeHtmlChars(CharSequence s) {
// Convert to string as CharSequence implementations can be slow - see JDK-8263321
String str = s.toString();
for (int i = 0; i < str.length(); i++) {
char ch = str.charAt(i);
switch (ch) {
// only start building a new string if we need to
case '<': case '>': case '&':
StringBuilder sb = new StringBuilder(str.substring(0, i));
escapeHtmlChars(str, i, sb);
return sb.toString();
}
}
return str;
}
/**
* Escapes the special HTML characters in a given string using the appropriate
* entities, appending the results into a string builder.
*
* @param s the string
* @param sb the string builder
*/
static void escapeHtmlChars(CharSequence s, StringBuilder sb) {
escapeHtmlChars(s.toString(), 0, sb);
}
private static void escapeHtmlChars(String s, int start, StringBuilder sb) {
for (int i = start ; i < s.length(); i++) {
char ch = s.charAt(i);
switch (ch) {
case '<': sb.append(Entity.LESS_THAN.text); break;
case '>': sb.append(Entity.GREATER_THAN.text); break;
case '&': sb.append(Entity.AMPERSAND.text); break;
default: sb.append(ch); break;
}
}
}
}
⏎ jdk/javadoc/internal/doclets/formats/html/markup/Entity.java
Or download all of them as a single archive file:
File name: jdk.javadoc-17.0.5-src.zip File size: 587730 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jcmd.jmod - JCmd Tool
2023-08-17, ≈52🔥, 0💬
Popular Posts:
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...
JDK 11 jdk.dynalink.jmod is the JMOD file for JDK 11 Dynamic Linking module. JDK 11 Dynamic Linking ...
What is the jaxp\SourceValidator.jav aprovided in the Apache Xerces package? I have Apache Xerces 2....
JDK 17 jdk.charsets.jmod is the JMOD file for JDK 17 Charsets module. JDK 17 Charsets module compile...
How to download and install javamail-1_2.zip? The JavaMail API is a set of abstract APIs that model ...