diff options
author | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-07-23 13:40:29 +0000 |
---|---|---|
committer | knowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2007-07-23 13:40:29 +0000 |
commit | 5cf284114a0b5012443b420ab3ab6e862b3c0206 (patch) | |
tree | a87b7b0d2be8e9939720c943c7c4a3f702244b57 /src/main | |
parent | 49de61fea3ad3fc7811a537bf8bbffc4cbf618c7 (diff) | |
download | pdf-as-3-5cf284114a0b5012443b420ab3ab6e862b3c0206.tar.gz pdf-as-3-5cf284114a0b5012443b420ab3ab6e862b3c0206.tar.bz2 pdf-as-3-5cf284114a0b5012443b420ab3ab6e862b3c0206.zip |
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@140 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/RetrieveSignatureDataServlet.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/RetrieveSignatureDataServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/RetrieveSignatureDataServlet.java index 402170c..cbc4e06 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/RetrieveSignatureDataServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/RetrieveSignatureDataServlet.java @@ -3,7 +3,9 @@ */
package at.knowcenter.wag.egov.egiz.web.servlets;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
+import java.io.InputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@@ -91,7 +93,18 @@ public class RetrieveSignatureDataServlet extends HttpServlet response.setContentType(sd.getMimeType());
response.setCharacterEncoding(sd.getCharacterEncoding());
- response.getOutputStream().write(sd.getData());
+ //response.getOutputStream().write(sd.getData());
+
+ //::::
+ InputStream is = new ByteArrayInputStream(sd.getData());
+ final int bufferSize = 1024;
+ byte[] buffer = new byte[bufferSize];
+ int len = -1;
+ while ((len = is.read(buffer)) != -1) {
+ response.getOutputStream().write(buffer, 0, len);
+ }
+ response.getOutputStream().flush();
+ //::::
log.debug("Writing SignatureData finished."); //$NON-NLS-1$
}
|