title: Change encoding of HttpServletResponse
body: <p>I have an API that returns XML, it actually returns it using the default encoding (I believe it's UTF-8), but now requirements have changed and we need to return everything in UTF-16LE.</p>
  
  <p>My question is: is there an easy way of doing this? I have access to the response just before the calls complete so I was wondering if I could do something like</p>
  
  <pre><code>//This method does not exist
  response.setCharacterEncoding("UTF-16LE");
  </code></pre>
  
  <p>Thanks a lot!</p>
  
  <p><strong>UPDATE:
  The method mentioned is the one to use. I was using an old version (2.3) of the servlet API that did not include it. Changing the version fixed it all.</strong></p>