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

📄 options.java

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 JAVA
字号:
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)package org.xbill.DNS;import java.util.*;/** * Boolean options:<BR> * bindttl - Print TTLs in BIND format<BR> * multiline - Print records in multiline format<BR> * noprintin - Don't print the class of a record if it's IN<BR> * verbose - Turn on general debugging statements<BR> * verbosemsg - Print all messages sent or received by SimpleResolver<BR> * verbosecompression - Print messages related to name compression<BR> * verbosesec - Print messages related to signature verification<BR> * verbosecache - Print messages related to cache lookups<BR> * <BR> * Valued options:<BR> * tsigfudge=n - Sets the default TSIG fudge value (in seconds)<BR> * sig0validity=n - Sets the default SIG(0) validity period (in seconds)<BR> * * @author Brian Wellington */public final class Options {private static Map table;static {	try {		refresh();	}	catch (SecurityException e) {	}}privateOptions() {}public static voidrefresh() {	String s = System.getProperty("dnsjava.options");	if (s != null) {		StringTokenizer st = new StringTokenizer(s, ",");		while (st.hasMoreTokens()) {			String token = st.nextToken();			int index = token.indexOf('=');			if (index == -1)				set(token);			else {				String option = token.substring(0, index);				String value = token.substring(index + 1);				set(option, value);			}		}	}}/** Clears all defined options */public static voidclear() {	table = null;}/** Sets an option to "true" */public static voidset(String option) {	if (table == null)		table = new HashMap();	table.put(option.toLowerCase(), "true");}/** Sets an option to the the supplied value */public static voidset(String option, String value) {	if (table == null)		table = new HashMap();	table.put(option.toLowerCase(), value.toLowerCase());}/** Removes an option */public static voidunset(String option) {	if (table == null)		return;	table.remove(option.toLowerCase());}/** Checks if an option is defined */public static booleancheck(String option) {	if (table == null)		return false;	return (table.get(option.toLowerCase()) != null);}/** Returns the value of an option */public static Stringvalue(String option) {	if (table == null)		return null;	return ((String)table.get(option.toLowerCase()));}/** * Returns the value of an option as an integer, or -1 if not defined. */public static intintValue(String option) {	String s = value(option);	if (s != null) {		try {			int val = Integer.parseInt(s);			if (val > 0)				return (val);		}		catch (NumberFormatException e) {		}	}	return (-1);}}

⌨️ 快捷键说明

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