|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.dpml.util.StreamUtils
public final class StreamUtils
Utility class that provides support for stream copy operations.
| Method Summary | |
|---|---|
static boolean |
compareStreams(InputStream in1,
InputStream in2)
Compare two streams. |
static void |
copyStream(InputStream src,
OutputStream dest,
boolean closeStreams)
Copy a stream. |
static void |
copyStream(NetworkMonitor monitor,
URL source,
int expected,
InputStream src,
OutputStream dest,
boolean closeStreams)
Copy a stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void copyStream(InputStream src,
OutputStream dest,
boolean closeStreams)
throws IOException,
NullArgumentException
src - the source input streamdest - the destination output streamcloseStreams - TRUE if the streams should be closed on completion
IOException - if an IO error occurs
NullArgumentException - if src or destination are null
public static void copyStream(NetworkMonitor monitor,
URL source,
int expected,
InputStream src,
OutputStream dest,
boolean closeStreams)
throws IOException,
NullArgumentException
monitor - optional network monitor to log updatessource - the source urlexpected - the expected size in bytessrc - the source input streamdest - the destination output streamcloseStreams - TRUE if the streams should be closed on completion
IOException - if an IO error occurs
NullArgumentException - if src or destination are null
public static boolean compareStreams(InputStream in1,
InputStream in2)
throws IOException
in1 - the first input streamin2 - the second input stream
IOException - if an IO error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||