/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format, String propertyName) throws IOException, IllegalArgumentException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, propertyName, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(propertyName, out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }
/** * Guts of the servlet - extracted for easy testing. */ static void writeResponse(Configuration conf, Writer out, String format) throws IOException, BadFormatException { if (FORMAT_JSON.equals(format)) { Configuration.dumpConfiguration(conf, out); } else if (FORMAT_XML.equals(format)) { conf.writeXml(out); } else { throw new BadFormatException("Bad format: " + format); } }