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 17 java.desktop.jmod - Desktop Module
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module.
JDK 17 Desktop module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.desktop.jmod.
JDK 17 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Desktop module source code files are stored in \fyicenter\jdk-17.0.5\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/MarkerSegment.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.IIOException; import java.io.IOException; import org.w3c.dom.Node; import org.w3c.dom.NamedNodeMap; /** * All metadata is stored in MarkerSegments. Marker segments * that we know about are stored in subclasses of this * basic class, which used for unrecognized APPn marker * segments. XXX break out UnknownMarkerSegment as a subclass * and make this abstract, avoiding unused data field. */ class MarkerSegment implements Cloneable { protected static final int LENGTH_SIZE = 2; // length is 2 bytes int tag; // See JPEG.java int length; /* Sometimes needed by subclasses; doesn't include itself. Meaningful only if constructed from a stream */ byte [] data = null; // Raw segment data, used for unrecognized segments boolean unknown = false; // Set to true if the tag is not recognized /** * Constructor for creating {@code MarkerSegment}s by reading * from an {@code ImageInputStream}. */ MarkerSegment(JPEGBuffer buffer) throws IOException { buffer.loadBuf(3); // tag plus length tag = buffer.buf[buffer.bufPtr++] & 0xff; length = (buffer.buf[buffer.bufPtr++] & 0xff) << 8; length |= buffer.buf[buffer.bufPtr++] & 0xff; length -= 2; // JPEG length includes itself, we don't if (length < 0) { throw new IIOException("Invalid segment length: " + length); } buffer.bufAvail -= 3; // Now that we know the true length, ensure that we've got it, // or at least a bufferful if length is too big. buffer.loadBuf(length); } /** * Constructor used when creating segments other than by * reading them from a stream. */ MarkerSegment(int tag) { this.tag = tag; length = 0; } /** * Construct a MarkerSegment from an "unknown" DOM Node. */ MarkerSegment(Node node) throws IIOInvalidTreeException { // The type of node should have been verified already. // get the attribute and assign it to the tag tag = getAttributeValue(node, null, "MarkerTag", 0, 255, true); length = 0; // get the user object and clone it to the data if (node instanceof IIOMetadataNode) { IIOMetadataNode iioNode = (IIOMetadataNode) node; try { data = (byte []) iioNode.getUserObject(); } catch (Exception e) { IIOInvalidTreeException newGuy = new IIOInvalidTreeException ("Can't get User Object", node); newGuy.initCause(e); throw newGuy; } } else { throw new IIOInvalidTreeException ("Node must have User Object", node); } } /** * Deep copy of data array. */ protected Object clone() { MarkerSegment newGuy = null; try { newGuy = (MarkerSegment) super.clone(); } catch (CloneNotSupportedException e) {} // won't happen if (this.data != null) { newGuy.data = data.clone(); } return newGuy; } /** * We have determined that we don't know the type, so load * the data using the length parameter. */ void loadData(JPEGBuffer buffer) throws IOException { data = new byte[length]; buffer.readData(data); } IIOMetadataNode getNativeNode() { IIOMetadataNode node = new IIOMetadataNode("unknown"); node.setAttribute("MarkerTag", Integer.toString(tag)); node.setUserObject(data); return node; } static int getAttributeValue(Node node, NamedNodeMap attrs, String name, int min, int max, boolean required) throws IIOInvalidTreeException { if (attrs == null) { attrs = node.getAttributes(); } String valueString = attrs.getNamedItem(name).getNodeValue(); int value = -1; if (valueString == null) { if (required) { throw new IIOInvalidTreeException (name + " attribute not found", node); } } else { value = Integer.parseInt(valueString); if ((value < min) || (value > max)) { throw new IIOInvalidTreeException (name + " attribute out of range", node); } } return value; } /** * Writes the marker, tag, and length. Note that length * should be verified by the caller as a correct JPEG * length, i.e it includes itself. */ void writeTag(ImageOutputStream ios) throws IOException { ios.write(0xff); ios.write(tag); write2bytes(ios, length); } /** * Writes the data for this segment to the stream in * valid JPEG format. */ void write(ImageOutputStream ios) throws IOException { length = 2 + ((data != null) ? data.length : 0); writeTag(ios); if (data != null) { ios.write(data); } } static void write2bytes(ImageOutputStream ios, int value) throws IOException { ios.write((value >> 8) & 0xff); ios.write(value & 0xff); } void printTag(String prefix) { System.out.println(prefix + " marker segment - marker = 0x" + Integer.toHexString(tag)); System.out.println("length: " + length); } void print() { printTag("Unknown"); if (length > 10) { System.out.print("First 5 bytes:"); for (int i=0;i<5;i++) { System.out.print(" Ox" + Integer.toHexString((int)data[i])); } System.out.print("\nLast 5 bytes:"); for (int i=data.length-5;i<data.length;i++) { System.out.print(" Ox" + Integer.toHexString((int)data[i])); } } else { System.out.print("Data:"); for (int i=0;i<data.length;i++) { System.out.print(" Ox" + Integer.toHexString((int)data[i])); } } System.out.println(); } }
⏎ com/sun/imageio/plugins/jpeg/MarkerSegment.java
Or download all of them as a single archive file:
File name: java.desktop-17.0.5-src.zip File size: 9152233 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.instrument.jmod - Instrument Module
2023-09-16, 59833👍, 0💬
Popular Posts:
JDK 11 java.rmi.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) module. JDK 11 RMI m...
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
Java Cryptography Extension 1.6 JAR File Size and Download Location: File name: jce.jar, jce-1.6.jar...
io.jar is a component in iText Java library to provide input/output functionalities. iText Java libr...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...