/** * Create a new lookup service using the specified database file. * * @param databaseFile * the database file. * @throws IOException * if an error occured creating the lookup service from the * database file. */ public LookupService(File databaseFile) throws IOException { this.databaseFile = databaseFile; file = new RandomAccessFile(databaseFile, "r"); init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile * the database file. * @param options * database flags to use when opening the database GEOIP_STANDARD * read database from disk GEOIP_MEMORY_CACHE cache the database * in RAM and read it from RAM * @throws IOException * if an error occured creating the lookup service from the * database file. */ public LookupService(File databaseFile, int options) throws IOException { this.databaseFile = databaseFile; file = new RandomAccessFile(databaseFile, "r"); dboptions = options; init(); }
synchronized void _check_mtime() { try { if ((dboptions & GEOIP_CHECK_CACHE) != 0) { long t = databaseFile.lastModified(); if (t != mtime) { /* GeoIP Database file updated */ /* refresh filehandle */ close(); file = new RandomAccessFile(databaseFile, "r"); databaseInfo = null; init(); } } } catch (IOException e) { throw new InvalidDatabaseException("Database not found", e); } }
/** * Create a new distributed lookup service using the license key * * @param options Resevered for future use * @param licenseKey license key provided by Maxmind to access distributed service */ public LookupService(int options,String licenseKey) throws IOException { this.licenseKey = licenseKey; dnsService = 1; init(); } /**
/** * Create a new distributed lookup service using the license key * * @param options Resevered for future use * @param licenseKey license key provided by Maxmind to access distributed service */ public LookupService(int options,String licenseKey) throws IOException { this.licenseKey = licenseKey; dnsService = 1; init(); } /**
/** * Create a new distributed lookup service using the license key * * @param options Resevered for future use * @param licenseKey license key provided by Maxmind to access * distributed service */ public LookupService(int options, String licenseKey) throws IOException { this.licenseKey = licenseKey; dnsService = 1; init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile the database file. * @throws java.io.IOException if an error occured creating the lookup service * from the database file. */ public LookupService(File databaseFile) throws IOException { this.databaseFile = databaseFile; this.file = new RandomAccessFile(databaseFile, "r"); init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile the database file. * @throws java.io.IOException if an error occured creating the lookup service * from the database file. */ public LookupService(File databaseFile) throws IOException { this.databaseFile = databaseFile; this.file = new RandomAccessFile(databaseFile, "r"); init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile the database file. * @throws java.io.IOException if an error occured creating the lookup * service from the database file. */ public LookupService(File databaseFile) throws IOException { this.databaseFile = databaseFile; this.file = new RandomAccessFile(databaseFile, "r"); init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile * the database file. * @throws IOException * if an error occured creating the lookup service from the * database file. */ public LookupService(File databaseFile) throws IOException { this.databaseFile = databaseFile; file = new RandomAccessFile(databaseFile, "r"); init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile * the database file. * @throws IOException * if an error occured creating the lookup service from the * database file. */ public LookupService(File databaseFile) throws IOException { this.databaseFile = databaseFile; file = new RandomAccessFile(databaseFile, "r"); init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile the database file. * @param options database flags to use when opening the database * GEOIP_STANDARD read database from disk * GEOIP_MEMORY_CACHE cache the database in RAM and read it from RAM * @throws java.io.IOException if an error occured creating the lookup service * from the database file. */ public LookupService(File databaseFile, int options) throws IOException{ this.databaseFile = databaseFile; this.file = new RandomAccessFile(databaseFile, "r"); dboptions = options; init(); } /**
/** * Create a new lookup service using the specified database file. * * @param databaseFile the database file. * @param options database flags to use when opening the database * GEOIP_STANDARD read database from disk * GEOIP_MEMORY_CACHE cache the database in RAM and read it from RAM * @throws java.io.IOException if an error occured creating the lookup service * from the database file. */ public LookupService(File databaseFile, int options) throws IOException{ this.databaseFile = databaseFile; this.file = new RandomAccessFile(databaseFile, "r"); dboptions = options; init(); } /**
/** * Create a new lookup service using the specified database file. * * @param databaseFile the database file. * @param options database flags to use when opening the database * GEOIP_STANDARD read database from disk GEOIP_MEMORY_CACHE cache the * database in RAM and read it from RAM * @throws java.io.IOException if an error occured creating the lookup * service from the database file. */ public LookupService(File databaseFile, int options) throws IOException { this.databaseFile = databaseFile; this.file = new RandomAccessFile(databaseFile, "r"); dboptions = options; init(); }
/** * Create a new lookup service using the specified database file. * * @param databaseFile * the database file. * @param options * database flags to use when opening the database GEOIP_STANDARD * read database from disk GEOIP_MEMORY_CACHE cache the database * in RAM and read it from RAM * @throws IOException * if an error occured creating the lookup service from the * database file. */ public LookupService(File databaseFile, int options) throws IOException { this.databaseFile = databaseFile; file = new RandomAccessFile(databaseFile, "r"); dboptions = options; init(); }
synchronized void _check_mtime(){ try { if ((dboptions & GEOIP_CHECK_CACHE) != 0){ long t = databaseFile.lastModified(); if (t != mtime){ /* GeoIP Database file updated */ /* refresh filehandle */ close(); file = new RandomAccessFile(databaseFile,"r"); databaseInfo = null; init(); } } } catch (IOException e) { System.out.println("file not found"); } }
synchronized void _check_mtime(){ try { if ((dboptions & GEOIP_CHECK_CACHE) != 0){ long t = databaseFile.lastModified(); if (t != mtime){ /* GeoIP Database file updated */ /* refresh filehandle */ close(); file = new RandomAccessFile(databaseFile,"r"); databaseInfo = null; init(); } } } catch (IOException e) { System.out.println("file not found"); } }
synchronized void _check_mtime() { try { if ((dboptions & GEOIP_CHECK_CACHE) != 0) { long t = databaseFile.lastModified(); if (t != mtime) { /* GeoIP Database file updated */ /* refresh filehandle */ close(); file = new RandomAccessFile(databaseFile, "r"); databaseInfo = null; init(); } } } catch (IOException e) { System.out.println("file not found"); } }
synchronized void _check_mtime() { try { if ((dboptions & GEOIP_CHECK_CACHE) != 0) { long t = databaseFile.lastModified(); if (t != mtime) { /* GeoIP Database file updated */ /* refresh filehandle */ close(); file = new RandomAccessFile(databaseFile, "r"); databaseInfo = null; init(); } } } catch (IOException e) { throw new InvalidDatabaseException("Database not found", e); } }
synchronized void _check_mtime() { try { if ((dboptions & GEOIP_CHECK_CACHE) != 0) { long t = databaseFile.lastModified(); if (t != mtime) { /* GeoIP Database file updated */ /* refresh filehandle */ close(); file = new RandomAccessFile(databaseFile, "r"); databaseInfo = null; init(); } } } catch (IOException e) { throw new InvalidDatabaseException("Database not found", e); } }