Example #1
0
  private static boolean commandLine(String[] args) {
    CommandLineParser cl = new CommandLineParser(args);

    // see if we are asking for help
    if (cl.getProperty("help") != null || cl.getProperty("-help") != null) {
      usage();
      return false;
    }

    inputImageFilename = cl.getProperty("i");
    if (inputImageFilename == null) {
      usage();
      return false;
    }

    outputImageFilename = cl.getProperty("o");
    if (outputImageFilename == null) {
      usage();
      return false;
    }

    encoder = cl.getProperty("e");
    if (encoder == null) {
      usage();
      return false;
    }

    String tmps = cl.getProperty("cs");
    if (tmps != null) tileCacheSize = Long.parseLong(tmps) * megaBytes;

    return true;
  }