private DatabaseReader openGeoIpDb(File geoDb) { try { DatabaseReader reader = new DatabaseReader(geoDb); LOG.info("Using geo ip database at [%s].", geoDb); return reader; } catch (IOException e) { throw new RuntimeException("Could not open geo db at [" + geoDb.getAbsolutePath() + "].", e); } }
/** * @return an instance of {@code DatabaseReader} created from the * fields set on this builder. * @throws IOException if there is an error reading the database */ public DatabaseReader build() throws IOException { return new DatabaseReader(this); } }
/** * @return an instance of {@code DatabaseReader} created from the * fields set on this builder. * @throws IOException if there is an error reading the database */ public DatabaseReader build() throws IOException { return new DatabaseReader(this); } }
/** * @return an instance of {@code DatabaseReader} created from the * fields set on this builder. * @throws IOException if there is an error reading the database */ public DatabaseReader build() throws IOException { return new DatabaseReader(this); } }
@Override public void onCreate(Bundle savedState) { DatabaseReader db = new DatabaseReader(this); // this being context Model model = new MyModel(db); Presenter presenter = new Presenter(model, this); // this being the View }
private DatabaseReader openGeoIpDb(File geoDb) { try { DatabaseReader reader = new DatabaseReader(geoDb); log.info("Using geo ip database at [%s].", geoDb); return reader; } catch (IOException e) { throw new RuntimeException("Could not open geo db at [" + geoDb.getAbsolutePath() + "].", e); } }
geoLookup = new DatabaseReader(geoDb); } catch(IOException e) { throw new RuntimeException("Unable to open geo ip lookup database", e);