Mercurial > hg > digilib-old
comparison servlet/src/digilib/image/DocuImage.java @ 819:a23c4c15a6a8 stream
clean up possible resource leaks. better behaviour with unknown image types.
author | robcast |
---|---|
date | Mon, 21 Feb 2011 22:36:35 +0100 |
parents | 2b58d2783ef0 |
children | a630d0303cce |
comparison
equal
deleted
inserted
replaced
817:0b4345866797 | 819:a23c4c15a6a8 |
---|---|
61 * @throws FileOpException | 61 * @throws FileOpException |
62 */ | 62 */ |
63 public void loadSubimage(ImageInput ii, Rectangle region, int subsample) | 63 public void loadSubimage(ImageInput ii, Rectangle region, int subsample) |
64 throws FileOpException; | 64 throws FileOpException; |
65 | 65 |
66 /** Writes the current image to a ServletResponse. | 66 /** Writes the current image to an OutputStream. |
67 * | 67 * |
68 * The image is encoded to the mime-type <code>mt</code> and sent to the output | 68 * The image is encoded to the mime-type <code>mt</code> and sent to the output |
69 * stream of the <code>ServletResponse</code> <code>res</code>. | 69 * stream <code>ostream</code>. |
70 * | 70 * |
71 * Currently only mime-types "image/jpeg" and "image/png" are supported. | 71 * Currently only mime-types "image/jpeg" and "image/png" are supported. |
72 * | 72 * |
73 * @param mt mime-type of the image to be sent. | 73 * @param mt mime-type of the image to be sent. |
74 * @param res ServletResponse where the image is sent. | 74 * @param ostream OutputStream where the image is sent. |
75 * @throws ServletException Exception thrown on sending data. | 75 * @throws ServletException Exception thrown on sending data. |
76 * @throws ImageOpException Exception in other cases. | 76 * @throws ImageOpException Exception in other cases. |
77 */ | 77 */ |
78 public void writeImage(String mt, OutputStream ostream) | 78 public void writeImage(String mt, OutputStream ostream) |
79 throws ServletException, ImageOpException; | 79 throws ServletException, ImageOpException; |