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.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java
/* * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.imageio.plugins.jpeg; import javax.imageio.metadata.IIOInvalidTreeException; import javax.imageio.metadata.IIOMetadataNode; import javax.imageio.stream.ImageOutputStream; import javax.imageio.plugins.jpeg.JPEGHuffmanTable; import java.io.IOException; import java.util.List; import java.util.ArrayList; import java.util.Iterator; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.NamedNodeMap; /** * A DHT (Define Huffman Table) marker segment. */ class DHTMarkerSegment extends MarkerSegment { List<Htable> tables = new ArrayList<>(); DHTMarkerSegment(boolean needFour) { super(JPEG.DHT); tables.add(new Htable(JPEGHuffmanTable.StdDCLuminance, true, 0)); if (needFour) { tables.add(new Htable(JPEGHuffmanTable.StdDCChrominance, true, 1)); } tables.add(new Htable(JPEGHuffmanTable.StdACLuminance, false, 0)); if (needFour) { tables.add(new Htable(JPEGHuffmanTable.StdACChrominance, false, 1)); } } DHTMarkerSegment(JPEGBuffer buffer) throws IOException { super(buffer); int count = length; while (count > 0) { Htable newGuy = new Htable(buffer); tables.add(newGuy); count -= 1 + 16 + newGuy.values.length; } buffer.bufAvail -= length; } DHTMarkerSegment(JPEGHuffmanTable[] dcTables, JPEGHuffmanTable[] acTables) { super(JPEG.DHT); for (int i = 0; i < dcTables.length; i++) { tables.add(new Htable(dcTables[i], true, i)); } for (int i = 0; i < acTables.length; i++) { tables.add(new Htable(acTables[i], false, i)); } } DHTMarkerSegment(Node node) throws IIOInvalidTreeException { super(JPEG.DHT); NodeList children = node.getChildNodes(); int size = children.getLength(); if ((size < 1) || (size > 4)) { throw new IIOInvalidTreeException("Invalid DHT node", node); } for (int i = 0; i < size; i++) { tables.add(new Htable(children.item(i))); } } protected Object clone() { DHTMarkerSegment newGuy = (DHTMarkerSegment) super.clone(); newGuy.tables = new ArrayList<>(tables.size()); Iterator<Htable> iter = tables.iterator(); while (iter.hasNext()) { Htable table = iter.next(); newGuy.tables.add((Htable) table.clone()); } return newGuy; } IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("dht"); for (int i= 0; i<tables.size(); i++) { Htable table = tables.get(i); node.appendChild(table.getNativeNode()); } return node; } /** * Writes the data for this segment to the stream in * valid JPEG format. */ void write(ImageOutputStream ios) throws IOException { // We don't write DHT segments; the IJG library does. } void print() { printTag("DHT"); System.out.println("Num tables: " + Integer.toString(tables.size())); for (int i= 0; i<tables.size(); i++) { Htable table = tables.get(i); table.print(); } System.out.println(); } Htable getHtableFromNode(Node node) throws IIOInvalidTreeException { return new Htable(node); } void addHtable(JPEGHuffmanTable table, boolean isDC, int id) { tables.add(new Htable(table, isDC, id)); } /** * A Huffman table within a DHT marker segment. */ class Htable implements Cloneable { int tableClass; // 0 == DC, 1 == AC int tableID; // 0 - 4 private static final int NUM_LENGTHS = 16; // # of codes of each length short [] numCodes = new short[NUM_LENGTHS]; short [] values; Htable(JPEGBuffer buffer) { tableClass = buffer.buf[buffer.bufPtr] >>> 4; tableID = buffer.buf[buffer.bufPtr++] & 0xf; for (int i = 0; i < NUM_LENGTHS; i++) { numCodes[i] = (short) (buffer.buf[buffer.bufPtr++] & 0xff); } int numValues = 0; for (int i = 0; i < NUM_LENGTHS; i++) { numValues += numCodes[i]; } values = new short[numValues]; for (int i = 0; i < numValues; i++) { values[i] = (short) (buffer.buf[buffer.bufPtr++] & 0xff); } } Htable(JPEGHuffmanTable table, boolean isDC, int id) { tableClass = isDC ? 0 : 1; tableID = id; numCodes = table.getLengths(); values = table.getValues(); } Htable(Node node) throws IIOInvalidTreeException { if (node.getNodeName().equals("dhtable")) { NamedNodeMap attrs = node.getAttributes(); int count = attrs.getLength(); if (count != 2) { throw new IIOInvalidTreeException ("dhtable node must have 2 attributes", node); } tableClass = getAttributeValue(node, attrs, "class", 0, 1, true); tableID = getAttributeValue(node, attrs, "htableId", 0, 3, true); if (node instanceof IIOMetadataNode) { IIOMetadataNode ourNode = (IIOMetadataNode) node; JPEGHuffmanTable table = (JPEGHuffmanTable) ourNode.getUserObject(); if (table == null) { throw new IIOInvalidTreeException ("dhtable node must have user object", node); } numCodes = table.getLengths(); values = table.getValues(); } else { throw new IIOInvalidTreeException ("dhtable node must have user object", node); } } else { throw new IIOInvalidTreeException ("Invalid node, expected dqtable", node); } } protected Object clone() { Htable newGuy = null; try { newGuy = (Htable) super.clone(); } catch (CloneNotSupportedException e) {} // won't happen if (numCodes != null) { newGuy.numCodes = numCodes.clone(); } if (values != null) { newGuy.values = values.clone(); } return newGuy; } IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("dhtable"); node.setAttribute("class", Integer.toString(tableClass)); node.setAttribute("htableId", Integer.toString(tableID)); node.setUserObject(new JPEGHuffmanTable(numCodes, values)); return node; } void print() { System.out.println("Huffman Table"); System.out.println("table class: " + ((tableClass == 0) ? "DC":"AC")); System.out.println("table id: " + Integer.toString(tableID)); (new JPEGHuffmanTable(numCodes, values)).toString(); /* System.out.print("Lengths:"); for (int i=0; i<16; i++) { System.out.print(" " + Integer.toString(numCodes[i])); } int count = 0; if (values.length > 16) { System.out.println("\nFirst 16 Values:"); count = 16; } else { System.out.println("\nValues:"); count = values.length; } for (int i=0; i<count; i++) { System.out.println(Integer.toString(values[i]&0xff)); } */ } } }
⏎ com/sun/imageio/plugins/jpeg/DHTMarkerSegment.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, 163433👍, 5💬
Popular Posts:
Where to find answers to frequently asked questions on Downloading and Installing Connector/J - JDBC...
JDK 11 jdk.aot.jmod is the JMOD file for JDK 11 Ahead-of-Time (AOT) Compiler module. JDK 11 AOT Comp...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-s...
How to download and install ojdbc11.jar for Oracle 21c? ojdbc11.jar for Oracle 21c is a Java JDBC Dr...