org.apache.avalon.excalibur.io
Class IOUtil
java.lang.Object
|
+--org.apache.avalon.excalibur.io.IOUtil
- public final class IOUtil
- extends java.lang.Object
This class provides basic facilities for manipulating io streams.
- Author:
- Peter Donald
Method Summary |
static void |
bufferedCopy(java.io.InputStream source,
java.io.OutputStream destination)
Copy stream-data from source to destination, with buffering. |
static void |
copy(java.io.InputStream input,
java.io.OutputStream output)
Copy stream-data from source to destination. |
static void |
shutdownStream(java.io.InputStream input)
|
static void |
shutdownStream(java.io.OutputStream output)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shutdownStream
public static void shutdownStream(java.io.OutputStream output)
shutdownStream
public static void shutdownStream(java.io.InputStream input)
copy
public static void copy(java.io.InputStream input,
java.io.OutputStream output)
throws java.io.IOException
- Copy stream-data from source to destination. This method does not
buffer, flush or close the streams, as to do so would require making
non-portable assumptions about the streams' origin and further use. If
you wish to perform a buffered copy, use
bufferedCopy(java.io.InputStream, java.io.OutputStream)
.
bufferedCopy
public static void bufferedCopy(java.io.InputStream source,
java.io.OutputStream destination)
throws java.io.IOException
- Copy stream-data from source to destination, with buffering.
This is equivalent to passing
copy(java.io.InputStream, java.io.OutputStream)
a BufferedInputStream
and java.io.BufferedOuputStream
to
copy(java.io.InputStream, java.io.OutputStream)
, and flushing the output stream afterwards. The streams
are not closed after the copy.
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.