Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java @ 5600:8128622e4b28 2.9.18
Set filename for the response
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 08 Apr 2013 16:58:14 +0200 |
parents | 555fa2774d3c |
children | 0d8564196d73 |
comparison
equal
deleted
inserted
replaced
5599:ba28e9ba981f | 5600:8128622e4b28 |
---|---|
391 try { | 391 try { |
392 OutputStream out = resp.getOutputStream(); | 392 OutputStream out = resp.getOutputStream(); |
393 try { | 393 try { |
394 byte [] buf = new byte[4096]; | 394 byte [] buf = new byte[4096]; |
395 int r; | 395 int r; |
396 resp.setHeader("Content-Disposition", | |
397 "attachment;filename=flys-karte.pdf"); | |
396 while ((r = in.read(buf)) >= 0) { | 398 while ((r = in.read(buf)) >= 0) { |
397 out.write(buf, 0, r); | 399 out.write(buf, 0, r); |
398 } | 400 } |
399 out.flush(); | 401 out.flush(); |
400 } | 402 } |