MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / Options

Class Options

src/main/java/core/org/xbill/DNS/Options.java:25–123  ·  view source on GitHub ↗

Boolean options: bindttl - Print TTLs in BIND format multiline - Print records in multiline format noprintin - Don't print the class of a record if it's IN verbose - Turn on general debugging statements verbosemsg - Print all messages sent or received by SimpleResolver verbos

Source from the content-addressed store, hash-verified

23 */
24
25public final class Options {
26
27private static Map table;
28
29static {
30 try {
31 refresh();
32 }
33 catch (SecurityException e) {
34 }
35}
36
37private
38Options() {}
39
40public static void
41refresh() {
42 String s = System.getProperty("dnsjava.options");
43 if (s != null) {
44 StringTokenizer st = new StringTokenizer(s, ",");
45 while (st.hasMoreTokens()) {
46 String token = st.nextToken();
47 int index = token.indexOf('=');
48 if (index == -1)
49 set(token);
50 else {
51 String option = token.substring(0, index);
52 String value = token.substring(index + 1);
53 set(option, value);
54 }
55 }
56 }
57}
58
59/** Clears all defined options */
60public static void
61clear() {
62 table = null;
63}
64
65/** Sets an option to "true" */
66public static void
67set(String option) {
68 if (table == null)
69 table = new HashMap();
70 table.put(option.toLowerCase(), "true");
71}
72
73/** Sets an option to the the supplied value */
74public static void
75set(String option, String value) {
76 if (table == null)
77 table = new HashMap();
78 table.put(option.toLowerCase(), value.toLowerCase());
79}
80
81/** Removes an option */
82public static void

Callers

nothing calls this directly

Calls 1

refreshMethod · 0.95

Tested by

no test coverage detected