try this method: 
   response.getOutputStream().write()