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