入口类:Fetch.java
配置文件类:Config.java
/*
* Main.java
*
* Created on 2007-9-4, 2:25:07
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package arpfetcher;
import java.util.*;
/**
*
* @author signx
*/
public class Fetch {
public Fetch() {
}
public static void main(String[] args) {
int total = 0;
Config config = new Config("target.conf");
ArrayList list = config.readConfig();
SqlDatabase db = null;
try {
ListIterator it = list.listIterator();
while (it.hasNext()) {
String[] s = (String[])it.next();
total += new FetchRunner(s[1],s[2],s[0]).run();
}
}
catch (Exception e) {System.out.println(e.getMessage());}
}
}
* Main.java
*
* Created on 2007-9-4, 2:25:07
*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package arpfetcher;
import java.util.*;
/**
*
* @author signx
*/
public class Fetch {
public Fetch() {
}
public static void main(String[] args) {
int total = 0;
Config config = new Config("target.conf");
ArrayList list = config.readConfig();
SqlDatabase db = null;
try {
ListIterator it = list.listIterator();
while (it.hasNext()) {
String[] s = (String[])it.next();
total += new FetchRunner(s[1],s[2],s[0]).run();
}
}
catch (Exception e) {System.out.println(e.getMessage());}
}
}
配置文件类:Config.java
package arpfetcher;
import java.io.*;
import java.util.*;
/**
*
* @author signx
*/
public class Config {
pri
import java.io.*;
import java.util.*;
/**
*
* @author signx
*/
public class Config {
pri