public IPSeeker(String fileName, String dir) {
		this.INSTALL_DIR =dir;
		this.IP_FILE =fileName;
		ipCache =new HashMap<String, IPLocation>();
		loc =new IPLocation();
		buf =new byte[256];
		b3 =new byte[3];
		b4 =new byte[4];
		try {
			ipFile =new RandomAccessFile(INSTALL_DIR +IP_FILE, "r");
		} catch (FileNotFoundException e) {
			LogFactory.log("IP地址数据库文件不存在", Level.WARNING, e);
		}
		if (ipFile !=null) {
			try {
				ipBegin =readLong4(0);
				ipEnd =readLong4(4);
				if (ipBegin == -1 || ipEnd == -1) {
					ipFile.close();
					ipFile =null;
				}
			} catch (IOException e) {
				LogFactory.log("IP地址数据库文件格式错误（无法正常读取文件头）", Level.WARNING, e);
				ipFile =null;
			}
		}
	}