GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — dnsjava/lookup.java at master · diamondq/dnsjava Expand file tree/ Copy pathlookup.javaMore file actions 50 lines (44 loc) · 1.21 KB / Copy pathlookup.javaFile metadata and controls50 lines (44 loc) · 1.21 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 // Copyright (c) 1999-2004 Brian Wellington ([email protected]) import org.xbill.DNS.*; /** @author Brian Wellington <[email protected]> */ public class lookup { public static void printAnswer(String name, Lookup lookup) { System.out.print(name + ":"); int result = lookup.getResult(); if (result != Lookup.SUCCESSFUL) System.out.print(" " + lookup.getErrorString()); System.out.println(); Name [] aliases = lookup.getAliases(); if (aliases.length > 0) { System.out.print("# aliases: "); for (int i = 0; i < aliases.length; i++) { System.out.print(aliases[i]); if (i < aliases.length - 1) System.out.print(" "); } System.out.println(); } if (lookup.getResult() == Lookup.SUCCESSFUL) { Record [] answers = lookup.getAnswers(); for (int i = 0; i < answers.length; i++) System.out.println(answers[i]); } } public static void main(String [] args) throws Exception { int type = Type.A; int start = 0; if (args.length > 2 && args[0].equals("-t")) { type = Type.value(args[1]); if (type < 0) throw new IllegalArgumentException("invalid type"); start = 2; } for (int i = start; i < args.length; i++) { Lookup l = new Lookup(args[i], type); l.run(); printAnswer(args[i], l); } } } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |