diff options
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-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$
}
|