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:
JRE 8 rt.jar - com.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime environment included in JDK 8. JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib 63,596,151 rt.jar
Here is the list of Java classes of the com.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ com/sun/jmx/snmp/daemon/SnmpMibTree.java
/* * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.jmx.snmp.daemon; // java imports // import java.util.Vector; import java.util.Enumeration; // jmx imports // import com.sun.jmx.snmp.SnmpOid; // SNMP Runtime imports // import com.sun.jmx.snmp.agent.SnmpMibAgent; /** * The class is used for building a tree representation of the different * root oids of the supported MIBs. Each node is associated to a specific MIB. */ final class SnmpMibTree { public SnmpMibTree() { defaultAgent= null; root= new TreeNode(-1, null, null); } public void setDefaultAgent(SnmpMibAgent def) { defaultAgent= def; root.agent= def; } public SnmpMibAgent getDefaultAgent() { return defaultAgent; } public void register(SnmpMibAgent agent) { root.registerNode(agent); } public void register(SnmpMibAgent agent, long[] oid) { root.registerNode(oid, 0, agent); } public SnmpMibAgent getAgentMib(SnmpOid oid) { TreeNode node= root.retrieveMatchingBranch(oid.longValue(), 0); if (node == null) return defaultAgent; else if(node.getAgentMib() == null) return defaultAgent; else return node.getAgentMib(); } public void unregister(SnmpMibAgent agent, SnmpOid[] oids) { for(int i = 0; i < oids.length; i++) { long[] oid = oids[i].longValue(); TreeNode node = root.retrieveMatchingBranch(oid, 0); if (node == null) continue; node.removeAgent(agent); } } public void unregister(SnmpMibAgent agent) { root.removeAgentFully(agent); } /* public void unregister(SnmpMibAgent agent) { long[] oid= agent.getRootOid(); TreeNode node= root.retrieveMatchingBranch(oid, 0); if (node == null) return; node.removeAgent(agent); } */ public void printTree() { root.printTree(">"); } private SnmpMibAgent defaultAgent; private TreeNode root; // A SnmpMibTree object is a tree of TreeNode // final class TreeNode { void registerNode(SnmpMibAgent agent) { long[] oid= agent.getRootOid(); registerNode(oid, 0, agent); } TreeNode retrieveMatchingBranch(long[] oid, int cursor) { TreeNode node= retrieveChild(oid, cursor); if (node == null) return this; if (children.isEmpty()) { // In this case, the node does not have any children. So no point to // continue the search ... return node; } if( cursor + 1 == oid.length) { // In this case, the oid does not have any more element. So the search // is over. return node; } TreeNode n = node.retrieveMatchingBranch(oid, cursor + 1); //If the returned node got a null agent, we have to replace it by //the current one (in case it is not null) // return n.agent == null ? this : n; } SnmpMibAgent getAgentMib() { return agent; } public void printTree(String ident) { StringBuilder buff= new StringBuilder(); if (agents == null) { return; } for(Enumeration<SnmpMibAgent> e= agents.elements(); e.hasMoreElements(); ) { SnmpMibAgent mib= e.nextElement(); if (mib == null) buff.append("empty "); else buff.append(mib.getMibName()).append(" "); } ident+= " "; if (children == null) { return; } for(Enumeration<TreeNode> e= children.elements(); e.hasMoreElements(); ) { TreeNode node= e.nextElement(); node.printTree(ident); } } // PRIVATE STUFF //-------------- /** * Only the treeNode class can create an instance of treeNode. * The creation occurs when registering a new oid. */ private TreeNode(long nodeValue, SnmpMibAgent agent, TreeNode sup) { this.nodeValue= nodeValue; this.parent= sup; agents.addElement(agent); } private void removeAgentFully(SnmpMibAgent agent) { Vector<TreeNode> v = new Vector<>(); for(Enumeration<TreeNode> e= children.elements(); e.hasMoreElements(); ) { TreeNode node= e.nextElement(); node.removeAgentFully(agent); if(node.agents.isEmpty()) v.add(node); } for(Enumeration<TreeNode> e= v.elements(); e.hasMoreElements(); ) { children.removeElement(e.nextElement()); } removeAgent(agent); } private void removeAgent(SnmpMibAgent mib) { if (!agents.contains(mib)) return; agents.removeElement(mib); if (!agents.isEmpty()) agent= agents.firstElement(); } private void setAgent(SnmpMibAgent agent) { this.agent = agent; } private void registerNode(long[] oid, int cursor, SnmpMibAgent agent) { if (cursor >= oid.length) //That's it ! // return; TreeNode child = retrieveChild(oid, cursor); if (child == null) { // Create a child and register it ! // long theValue= oid[cursor]; child= new TreeNode(theValue, agent, this); children.addElement(child); } else if (agents.contains(agent) == false) { agents.addElement(agent); } // We have to set the agent attribute // if(cursor == (oid.length - 1)) { child.setAgent(agent); } else child.registerNode(oid, cursor+1, agent); } private TreeNode retrieveChild(long[] oid, int current) { long theValue= oid[current]; for(Enumeration<TreeNode> e= children.elements(); e.hasMoreElements(); ) { TreeNode node= e.nextElement(); if (node.match(theValue)) return node; } return null; } private boolean match(long value) { return (nodeValue == value) ? true : false; } private Vector<TreeNode> children= new Vector<>(); private Vector<SnmpMibAgent> agents= new Vector<>(); private long nodeValue; private SnmpMibAgent agent; private TreeNode parent; }; // end of class TreeNode }
⏎ com/sun/jmx/snmp/daemon/SnmpMibTree.java
Or download all of them as a single archive file:
File name: jre-rt-com-1.8.0_191-src.zip File size: 8099783 bytes Release date: 2018-10-28 Download
⇒ Backup JDK 8 Installation Directory
2023-02-07, 254212👍, 3💬
Popular Posts:
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool, which can be invoked by the "jlink" co...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
What Is poi-contrib-3.5.jar? poi-contrib-3.5.jar is one of the JAR files for Apache POI 3.5, which p...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...