title: HttpServletResponse - writing to response writer vs outputstream
body: <p>When adding to some content to HttpServletResponse in java I can either get the response writer and append:</p>
  
  <pre><code>httpResponse.getWriter().append("Some Content");
  </code></pre>
  
  <p>Or I can add content to the output-stream:</p>
  
  <pre><code>ServletOutputStream servletOut = httpResponse.getOutputStream();
  servletOut.write(someByteArray);
  </code></pre>
  
  <p>Is the only difference between the two is that the first gets strings/char-sequences and the second gets bytes (of course the content-type is affected as well)? Should I prefer one over the other? When should I use which?</p>