ServletOutputStream output = response.getOutputStream(); output.write(byte[]);
What is the most effective way to write File to javax.servlet.Servle
IOUtils.copy(in, out); out.flush(); //........... out.close(); // depends on your application
Where in is the FileInputStream and out is the SocketOutputStream. IOUtils is a utility from Commons IO module in Apache Commons.
in
out
SocketOutputStream