From ece7d18cf35374bf4e26d041799cda8f791c89f8 Mon Sep 17 00:00:00 2001 From: gregor Date: Mon, 7 Jul 2003 10:58:37 +0000 Subject: Initial commit git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@2 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../at/gv/egovernment/moa/util/StreamUtils.html | 265 +++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 spss.server/doc/api-doc-internal/at/gv/egovernment/moa/util/StreamUtils.html (limited to 'spss.server/doc/api-doc-internal/at/gv/egovernment/moa/util/StreamUtils.html') diff --git a/spss.server/doc/api-doc-internal/at/gv/egovernment/moa/util/StreamUtils.html b/spss.server/doc/api-doc-internal/at/gv/egovernment/moa/util/StreamUtils.html new file mode 100644 index 000000000..a2615fd60 --- /dev/null +++ b/spss.server/doc/api-doc-internal/at/gv/egovernment/moa/util/StreamUtils.html @@ -0,0 +1,265 @@ + + + + + + +MOA SP/SS Server Internal API: Class StreamUtils + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +

+ +at.gv.egovernment.moa.util +
+Class StreamUtils

+
+java.lang.Object
+  |
+  +--at.gv.egovernment.moa.util.StreamUtils
+
+
+
+
public class StreamUtils
extends Object
+ +

+Utility methods for streams. +

+

+
Version:
$Id$
+
Author:
Patrick Peck
+
+
+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
StreamUtils() + +
+           
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static booleancompareStreams(InputStream is1, + InputStream is2) + +
+          Compare the contents of two InputStreams.
+static byte[]readStream(InputStream in) + +
+          Reads a byte array from a stream.
+static StringreadStream(InputStream in, + String encoding) + +
+          Reads a String from a stream, using given encoding.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+StreamUtils

+
+public StreamUtils()
+
+
+ + + + + + + + +
+Method Detail
+ +

+compareStreams

+
+public static boolean compareStreams(InputStream is1,
+                                     InputStream is2)
+                              throws IOException
+
+
Compare the contents of two InputStreams.
+
Parameters:
is1 - The 1st InputStream to compare.
is2 - The 2nd InputStream to compare.
Returns:
boolean true, if both streams contain the exactly the + same content, false otherwise.
Throws:
IOException - An error occurred reading one of the streams.
+
+
+
+ +

+readStream

+
+public static byte[] readStream(InputStream in)
+                         throws IOException
+
+
Reads a byte array from a stream.
+
Parameters:
in - The InputStream to read.
Returns:
The bytes contained in the given InputStream.
Throws:
IOException - on any exception thrown
+
+
+
+ +

+readStream

+
+public static String readStream(InputStream in,
+                                String encoding)
+                         throws IOException
+
+
Reads a String from a stream, using given encoding.
+
Parameters:
in - The InputStream to read.
encoding - The character encoding to use for converting the bytes + of the InputStream into a String.
Returns:
The content of the given InputStream converted into + a String.
Throws:
IOException - on any exception thrown
+
+
+ +
+ + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + -- cgit v1.2.3