net.grinder.testutility
Class StreamCopier
java.lang.Object
net.grinder.testutility.StreamCopier
public class StreamCopier
- extends Object
Class that copies from InputStreams to
OutputStreams.
- Author:
- Philip Aston
|
Method Summary |
void |
copy(InputStream in,
OutputStream out)
Copies from the input stream to the output stream until the input
stream is empty or one of the streams reports an error. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamCopier
public StreamCopier(int bufferSize)
- Constructor.
- Parameters:
bufferSize - The buffer size.
StreamCopier
public StreamCopier()
copy
public void copy(InputStream in,
OutputStream out)
throws IOException
- Copies from the input stream to the output stream until the input
stream is empty or one of the streams reports an error.
Not thread safe - use multiple StreamCopier
instances instead.
- Parameters:
in - Input stream.out - Output stream.
- Throws:
IOException - If an IO problem occurred during the copy.
Copyright © 2000-2012. All Rights Reserved.