|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (3)
View Page History| {note:title=Ugly code alert} |
| {code} |
| OutputStream outputStream = response.getOutputStream(); FileInputStream fileInputStream = new FileInputStream(file); // Copy the contents of the file to the output stream byte[] buffer = new byte[1024]; int count = 0; while ((count = fileInputStream.read(buffer)) >= 0) { outputStream.write(buffer, 0, count); } |
| |
| outputStream.flush(); |
| {code} |