Package com.maxmind.db

Examples of com.maxmind.db.Reader


    private final ObjectMapper om;

    private DatabaseReader(Builder builder) throws IOException {
        if (builder.stream != null) {
            this.reader = new Reader(builder.stream);
        } else if (builder.database != null) {
            this.reader = new Reader(builder.database, builder.mode);
        } else {
            // This should never happen. If it does, review the Builder class
            // constructors for errors.
            throw new IllegalArgumentException(
                    "Unsupported Builder configuration: expected either File or URL");
View Full Code Here


     
      super(builder, config, parent, child, context);     
      this.inputFieldName = getConfigs().getString(config, "inputField");
      this.databaseFile = new File(getConfigs().getString(config, "database", "GeoLite2-City.mmdb"));
      try {
        this.databaseReader = new Reader(databaseFile);
      } catch (IOException e) {
        throw new MorphlineCompilationException("Cannot read Maxmind database: " + databaseFile, config, e);
      }
      validateArguments();
    }
View Full Code Here

     
      super(builder, config, parent, child, context);     
      this.inputFieldName = getConfigs().getString(config, "inputField");
      this.databaseFile = new File(getConfigs().getString(config, "database", "GeoLite2-City.mmdb"));
      try {
        this.databaseReader = new Reader(databaseFile);
      } catch (IOException e) {
        throw new MorphlineCompilationException("Cannot read Maxmind database: " + databaseFile, config, e);
      }
      validateArguments();
    }
View Full Code Here

TOP

Related Classes of com.maxmind.db.Reader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.