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.setContentLength (trans.getContentLength ());
res.setContentType (trans.contentType); res.setContentType (trans.contentType);
try { try {
Writer writer = res.getWriter (); OutputStream out = new BufferedOutputStream (res.getOutputStream ());
writer.write (trans.getContentString ()); out.write (trans.getContent ());
writer.flush (); out.flush ();
} catch(Exception io_e) { System.out.println ("Error in writeResponse: "+io_e); } } 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.setContentLength (trans.getContentLength ());
res.setContentType (trans.contentType); res.setContentType (trans.contentType);
try { try {
Writer writer = new BufferedWriter (res.getWriter ()); OutputStream out = new BufferedOutputStream (res.getOutputStream ());
writer.write (trans.getContentString ()); out.write (trans.getContent ());
writer.flush (); out.flush ();
} catch(Exception io_e) {} } catch(Exception io_e) {}
} }
} }