if (args.length > 3) { if (("-cer").equals(args[3])) {
if (args.length > 2) { if (("-der").equals(args[3])) {
    public void execute() throws IllegalAdminCommandException, ErrorAdminCommandException {        if (args.length < 3) {            String msg = "Save root CA certificate (PEM- or DER-format) to file.\n";            msg += "Usage: CA getrootcert <caname> <filename> <-der>";            throw new IllegalAdminCommandException(msg);        }        String caname = args[1];        String filename = args[2];        boolean pem = true;        if (args.length > 3) {            if (("-cer").equals(args[3])) {                pem = false;            }        }                try {            ArrayList chain = new ArrayList(getCertChain(caname));            X509Certificate rootcert = (X509Certificate)chain.get(chain.size()-1);            FileOutputStream fos = new FileOutputStream(filename);            if (pem) {                fos.write(CertTools.getPEMFromCerts(chain));            } else {                fos.write(rootcert.getEncoded());            }            fos.close();        } catch (Exception e) {            throw new ErrorAdminCommandException(e);        }        System.out.println("Wrote Root CA certificate to '" + filename + "'");    }