Package org.contikios.coffee.CoffeeFS

Examples of org.contikios.coffee.CoffeeFS.CoffeeException


              "start_offset", "default_file_size",
              "default_log_size", "page_type_size"};
    Properties prop = new Properties();
    InputStream stream = CoffeeConfiguration.class.getResourceAsStream("/" + filename);
    if (stream == null) {
      throw new CoffeeException("failed to load the configuration file " + filename);
    }

    prop.load(stream);
    for (int i = 0; i < requiredParameters.length; i++) {
      if (prop.getProperty(requiredParameters[i]) == null) {
        throw new CoffeeException("missing the parameter \"" + requiredParameters[i] + "\" in the configuration file " + filename);
      }
    }

    nameLength = Integer.parseInt(prop.getProperty("name_length"));
    useMicroLogs = new Boolean(prop.getProperty("use_micro_logs")).booleanValue();
View Full Code Here

TOP

Related Classes of org.contikios.coffee.CoffeeFS.CoffeeException

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.