aboutsummaryrefslogtreecommitdiff
path: root/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java
diff options
context:
space:
mode:
authorgregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2003-11-20 08:44:42 +0000
committergregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d>2003-11-20 08:44:42 +0000
commit9149618d9049d470d0423c4e896ab6c127eb6c02 (patch)
treec103a1aabc756b75ec76e435d13013ffa388f4c3 /spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java
parent72819e05aa9db32ef828d9b35d8980a77d1bd76e (diff)
downloadmoa-id-spss-9149618d9049d470d0423c4e896ab6c127eb6c02.tar.gz
moa-id-spss-9149618d9049d470d0423c4e896ab6c127eb6c02.tar.bz2
moa-id-spss-9149618d9049d470d0423c4e896ab6c127eb6c02.zip
Erstellt.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@59 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java')
-rw-r--r--spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java55
1 files changed, 55 insertions, 0 deletions
diff --git a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java
new file mode 100644
index 000000000..b0609c2f8
--- /dev/null
+++ b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/filters/ServletInputStream.java
@@ -0,0 +1,55 @@
+/*
+ * Created on 19.11.2003
+ *
+ * (c) Stabsstelle IKT-Strategie des Bundes
+ */
+package at.gv.egovernment.moa.spss.slinterface.filters;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+/**
+ * @author Gregor Karlinger (mailto:gregor.karlinger@cio.gv.at)
+ */
+public class ServletInputStream extends javax.servlet.ServletInputStream
+{
+ private ByteArrayInputStream inputStream_;
+ private int length_;
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ /**
+ * Generates a new <code>ServletInputStram</code> from the specified stream.
+ *
+ * @param inputStream See above.
+ */
+ public ServletInputStream(ByteArrayInputStream inputStream)
+ {
+ super();
+ inputStream_ = inputStream;
+ length_ = inputStream_.available();
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ /**
+ * Reads a single byte from the underlying <code>ByteArrayInputStream</code>.
+ *
+ * @see java.io.InputStream#read()
+ */
+ public int read() throws IOException
+ {
+ return inputStream_.read();
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ /**
+ * Gets the length of the content from this input stream. This equals to the number of bytes which where
+ * available at the time of creating this <code>ServletInputStream</code>.
+ */
+ public int getContentLength()
+ {
+ return length_;
+ }
+}