1 package dolda.jsvc.util;
6 public abstract class SimpleWriter implements Responder {
9 public SimpleWriter(String ctype) {
13 public SimpleWriter() {
17 public abstract void respond(Request req, PrintWriter out);
19 public void respond(Request req) {
20 req.outheaders().put("Content-Type", "text/" + ctype + "; charset=utf-8");
23 out = new PrintWriter(new OutputStreamWriter(req.output(), "UTF-8"));
24 } catch(UnsupportedEncodingException e) {