comparison servlet/src/digilib/pdf/PDFFileWorker.java @ 801:72662bb585ba stream

remove all ServletOutputStream.flush(). (stupid me ;-)
author robcast
date Sat, 19 Feb 2011 11:07:08 +0100
parents fd2ef7e46119
children
comparison
equal deleted inserted replaced
800:65e70c03870b 801:72662bb585ba
44 this.finalFile = finalFile; 44 this.finalFile = finalFile;
45 this.streamWorker = new PDFStreamWorker(dlConfig, outstream, job_info, imageJobCenter); 45 this.streamWorker = new PDFStreamWorker(dlConfig, outstream, job_info, imageJobCenter);
46 } 46 }
47 47
48 public File call() throws Exception { 48 public File call() throws Exception {
49 OutputStream outstream = streamWorker.call(); 49 OutputStream outstream = null;
50 outstream.flush(); 50 try {
51 // move temporary to final file 51 outstream = streamWorker.call();
52 tempFile.renameTo(finalFile); 52 outstream.flush();
53 outstream.close();
54 // move temporary to final file
55 tempFile.renameTo(finalFile);
56 } finally {
57 if (outstream != null) {
58 outstream.close();
59 }
60 }
53 return finalFile; 61 return finalFile;
54 } 62 }
55 63
56 64
57 } 65 }