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:
JDK 17 jdk.naming.dns.jmod - Naming DNS Module
JDK 17 jdk.naming.dns.jmod is the JMOD file for JDK 17 Naming DNS module.
JDK 17 Naming DNS module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.naming.dns.jmod.
JDK 17 Naming DNS module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Naming DNS module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.naming.dns.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/jndi/dns/Header.java
/*
* Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.jndi.dns;
import javax.naming.*;
/**
* The Header class represents the header of a DNS message.
*
* @author Scott Seligman
*/
class Header {
static final int HEADER_SIZE = 12; // octets in a DNS header
// Masks and shift amounts for DNS header flag fields.
static final short QR_BIT = (short) 0x8000;
static final short OPCODE_MASK = (short) 0x7800;
static final int OPCODE_SHIFT = 11;
static final short AA_BIT = (short) 0x0400;
static final short TC_BIT = (short) 0x0200;
static final short RD_BIT = (short) 0x0100;
static final short RA_BIT = (short) 0x0080;
static final short RCODE_MASK = (short) 0x000F;
int xid; // ID: 16-bit query identifier
boolean query; // QR: true if query, false if response
int opcode; // OPCODE: 4-bit opcode
boolean authoritative; // AA
boolean truncated; // TC
boolean recursionDesired; // RD
boolean recursionAvail; // RA
int rcode; // RCODE: 4-bit response code
int numQuestions;
int numAnswers;
int numAuthorities;
int numAdditionals;
/*
* Returns a representation of a decoded DNS message header.
* Does not modify or store a reference to the msg array.
*/
Header(byte[] msg, int msgLen) throws NamingException {
decode(msg, msgLen);
}
/*
* Decodes a DNS message header. Does not modify or store a
* reference to the msg array.
*/
private void decode(byte[] msg, int msgLen) throws NamingException {
try {
int pos = 0; // current offset into msg
if (msgLen < HEADER_SIZE) {
throw new CommunicationException(
"DNS error: corrupted message header");
}
xid = getShort(msg, pos);
pos += 2;
// Flags
short flags = (short) getShort(msg, pos);
pos += 2;
query = (flags & QR_BIT) == 0;
opcode = (flags & OPCODE_MASK) >>> OPCODE_SHIFT;
authoritative = (flags & AA_BIT) != 0;
truncated = (flags & TC_BIT) != 0;
recursionDesired = (flags & RD_BIT) != 0;
recursionAvail = (flags & RA_BIT) != 0;
rcode = (flags & RCODE_MASK);
// RR counts
numQuestions = getShort(msg, pos);
pos += 2;
numAnswers = getShort(msg, pos);
pos += 2;
numAuthorities = getShort(msg, pos);
pos += 2;
numAdditionals = getShort(msg, pos);
pos += 2;
} catch (IndexOutOfBoundsException e) {
throw new CommunicationException(
"DNS error: corrupted message header");
}
}
/*
* Returns the 2-byte unsigned value at msg[pos]. The high
* order byte comes first.
*/
private static int getShort(byte[] msg, int pos) {
return (((msg[pos] & 0xFF) << 8) |
(msg[pos + 1] & 0xFF));
}
}
⏎ com/sun/jndi/dns/Header.java
Or download all of them as a single archive file:
File name: jdk.naming.dns-17.0.5-src.zip File size: 48006 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.naming.rmi.jmod - Naming RMI Module
2023-07-29, ∼3628🔥, 0💬
Popular Posts:
How to download and install ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is a Java 5 J...
Guava is a suite of core and expanded libraries that include utility classes, google's collections, ...
What Is commons-fileupload-1.3.3 .jar?commons-fileupload-1.3.3 .jaris the JAR file for Apache Common...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...