Write byte[] instead of char[]

This commit is contained in:
hns 2001-02-27 20:54:57 +00:00
parent f6b2001fb4
commit 6b52e4a797
2 changed files with 6 additions and 6 deletions

View file

@ -171,9 +171,9 @@ public class AcmeServletClient extends HttpServlet{
res.setContentLength (trans.getContentLength ());
res.setContentType (trans.contentType);
try {
Writer writer = res.getWriter ();
writer.write (trans.getContentString ());
writer.flush ();
OutputStream out = new BufferedOutputStream (res.getOutputStream ());
out.write (trans.getContent ());
out.flush ();
} catch(Exception io_e) { System.out.println ("Error in writeResponse: "+io_e); }
}
}

View file

@ -220,9 +220,9 @@ public class ServletClient extends HttpServlet{
res.setContentLength (trans.getContentLength ());
res.setContentType (trans.contentType);
try {
Writer writer = new BufferedWriter (res.getWriter ());
writer.write (trans.getContentString ());
writer.flush ();
OutputStream out = new BufferedOutputStream (res.getOutputStream ());
out.write (trans.getContent ());
out.flush ();
} catch(Exception io_e) {}
}
}