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 jdk.management.agent.jmod - Management Agent Module
JDK 17 jdk.management.agent.jmod is the JMOD file for JDK 17 Management Agent module.
JDK 17 Management Agent module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.management.agent.jmod.
JDK 17 Management Agent module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Management Agent module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.management.agent.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/management/jdp/JdpPacketReader.java
/* * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.management.jdp; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.EOFException; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * JdpPacketReader responsible for reading a packet <p>This class gets a byte * array as it came from a Net, validates it and breaks a part </p> */ public final class JdpPacketReader { private final DataInputStream pkt; private Map<String, String> pmap = null; /** * Create packet reader, extract and check magic and version * * @param packet - packet received from a Net * @throws JdpException */ public JdpPacketReader(byte[] packet) throws JdpException { ByteArrayInputStream bais = new ByteArrayInputStream(packet); pkt = new DataInputStream(bais); try { int magic = pkt.readInt(); JdpGenericPacket.checkMagic(magic); } catch (IOException e) { throw new JdpException("Invalid JDP packet received, bad magic"); } try { short version = pkt.readShort(); JdpGenericPacket.checkVersion(version); } catch (IOException e) { throw new JdpException("Invalid JDP packet received, bad protocol version"); } } /** * Get next entry from packet * * @return the entry * @throws EOFException * @throws JdpException */ public String getEntry() throws EOFException, JdpException { try { short len = pkt.readShort(); // Artificial setting the "len" field to Short.MAX_VALUE may cause a reader to allocate // to much memory. Prevent this possible DOS attack. if (len < 1 && len > pkt.available()) { throw new JdpException("Broken JDP packet. Invalid entry length field."); } byte[] b = new byte[len]; if (pkt.read(b) != len) { throw new JdpException("Broken JDP packet. Unable to read entry."); } return new String(b, "UTF-8"); } catch (EOFException e) { throw e; } catch (UnsupportedEncodingException ex) { throw new JdpException("Broken JDP packet. Unable to decode entry."); } catch (IOException e) { throw new JdpException("Broken JDP packet. Unable to read entry."); } } /** * return packet content as a key/value map * * @return map containing packet entries pair of entries treated as * key,value * @throws IOException * @throws JdpException */ public Map<String, String> getDiscoveryDataAsMap() throws JdpException { // return cached map if possible if (pmap != null) { return pmap; } String key = null, value = null; final Map<String, String> tmpMap = new HashMap<>(); try { while (true) { key = getEntry(); value = getEntry(); tmpMap.put(key, value); } } catch (EOFException e) { // EOF reached on reading value, report broken packet // otherwise ignore it. if (value == null) { throw new JdpException("Broken JDP packet. Key without value." + key); } } pmap = Collections.unmodifiableMap(tmpMap); return pmap; } }
⏎ sun/management/jdp/JdpPacketReader.java
Or download all of them as a single archive file:
File name: jdk.management.agent-17.0.5-src.zip File size: 41948 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.management.jfr.jmod - Management JFR Module
2023-07-29, 1239👍, 0💬
Popular Posts:
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain...
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
JDK 11 jdk.internal.opt.jmod is the JMOD file for JDK 11 Internal Opt module. JDK 11 Internal Opt mo...
commons-fileupload-1.3.3 -sources.jaris the source JAR file for Apache Commons FileUpload 1.3., whic...
A stream buffer is a stream-based representation of an XML infoset in Java. Stream buffers are desig...