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:
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/internal/SnmpTools.java
/*
* Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.jmx.snmp.internal;
import com.sun.jmx.snmp.SnmpDefinitions;
/**
* Utility class used to deal with various data representations.
* <p><b>This API is a Sun Microsystems internal API and is subject
* to change without notice.</b></p>
* @since 1.5
*/
public class SnmpTools implements SnmpDefinitions {
/**
* Translates a binary representation in an ASCII one. The returned string is an hexadecimal string starting with 0x.
* @param data Binary to translate.
* @return Translated binary.
*/
static public String binary2ascii(byte[] data, int length)
{
if(data == null) return null;
final int size = (length * 2) + 2;
byte[] asciiData = new byte[size];
asciiData[0] = (byte) '0';
asciiData[1] = (byte) 'x';
for (int i=0; i < length; i++) {
int j = i*2;
int v = (data[i] & 0xf0);
v = v >> 4;
if (v < 10)
asciiData[j+2] = (byte) ('0' + v);
else
asciiData[j+2] = (byte) ('A' + (v - 10));
v = ((data[i] & 0xf));
if (v < 10)
asciiData[j+1+2] = (byte) ('0' + v);
else
asciiData[j+1+2] = (byte) ('A' + (v - 10));
}
return new String(asciiData);
}
/**
* Translates a binary representation in an ASCII one. The returned string is an hexadecimal string starting with 0x.
* @param data Binary to translate.
* @return Translated binary.
*/
static public String binary2ascii(byte[] data)
{
return binary2ascii(data, data.length);
}
/**
* Translates a stringified representation in a binary one. The passed string is an hexadecimal one starting with 0x.
* @param str String to translate.
* @return Translated string.
*/
static public byte[] ascii2binary(String str) {
if(str == null) return null;
String val = str.substring(2);
int size = val.length();
byte []buf = new byte[size/2];
byte []p = val.getBytes();
for(int i = 0; i < (size / 2); i++)
{
int j = i * 2;
byte v = 0;
if (p[j] >= '0' && p[j] <= '9') {
v = (byte) ((p[j] - '0') << 4);
}
else if (p[j] >= 'a' && p[j] <= 'f') {
v = (byte) ((p[j] - 'a' + 10) << 4);
}
else if (p[j] >= 'A' && p[j] <= 'F') {
v = (byte) ((p[j] - 'A' + 10) << 4);
}
else
throw new Error("BAD format :" + str);
if (p[j+1] >= '0' && p[j+1] <= '9') {
//System.out.println("ascii : " + p[j+1]);
v += (p[j+1] - '0');
//System.out.println("binary : " + v);
}
else if (p[j+1] >= 'a' && p[j+1] <= 'f') {
//System.out.println("ascii : " + p[j+1]);
v += (p[j+1] - 'a' + 10);
//System.out.println("binary : " + v+1);
}
else if (p[j+1] >= 'A' && p[j+1] <= 'F') {
//System.out.println("ascii : " + p[j+1]);
v += (p[j+1] - 'A' + 10);
//System.out.println("binary : " + v);
}
else
throw new Error("BAD format :" + str);
buf[i] = v;
}
return buf;
}
}
⏎ com/sun/jmx/snmp/internal/SnmpTools.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, ≈720🔥, 3💬
Popular Posts:
JDK 11 jdk.crypto.ec.jmod is the JMOD file for JDK 11 Crypto EC module. JDK 11 Crypto EC module comp...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...
Apache Neethi provides general framework for the programmers to use WS Policy. It is compliant with ...
What Is poi-ooxml-3.5.jar? poi-ooxml-3.5.jar is one of the JAR files for Apache POI 3.5, which provi...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...