@Override
 public void writeBody(Writer out) throws IOException {
   if (out instanceof PrintWriter) {
     body.writeTo((PrintWriter) out);
   } else {
     super.writeBody(out);
   }
 }
 @Override
 public void writeHead(Writer out) throws IOException {
   if (out instanceof PrintWriter) {
     head.writeTo((PrintWriter) out);
   } else {
     super.writeHead(out);
   }
 }