⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flags.java

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 JAVA
字号:
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)package org.xbill.DNS;/** * Constants and functions relating to flags in the DNS header. * * @author Brian Wellington */public final class Flags {private static Mnemonic flags = new Mnemonic("DNS Header Flag",					     Mnemonic.CASE_LOWER);/** query/response */public static final byte QR		= 0;/** authoritative answer */public static final byte AA		= 5;/** truncated */public static final byte TC		= 6;/** recursion desired */public static final byte RD		= 7;/** recursion available */public static final byte RA		= 8;/** authenticated data */public static final byte AD		= 10;/** (security) checking disabled */public static final byte CD		= 11;/** dnssec ok (extended) */public static final int DO		= ExtendedFlags.DO;static {	flags.setMaximum(0xF);	flags.setPrefix("FLAG");	flags.setNumericAllowed(true);	flags.add(QR, "qr");	flags.add(AA, "aa");	flags.add(TC, "tc");	flags.add(RD, "rd");	flags.add(RA, "ra");	flags.add(AD, "ad");	flags.add(CD, "cd");}privateFlags() {}/** Converts a numeric Flag into a String */public static Stringstring(int i) {	return flags.getText(i);}/** Converts a String representation of an Flag into its numeric value */public static intvalue(String s) {	return flags.getValue(s);}/** * Indicates if a bit in the flags field is a flag or not.  If it's part of * the rcode or opcode, it's not. */public static booleanisFlag(int index) {	flags.check(index);	if ((index >= 1 && index <= 4) || (index >= 12))		return false;	return true;}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -