net.sf.asyncobjects.io
Class ByteStreamForwarder
java.lang.Object
net.sf.asyncobjects.io.ByteStreamForwarder
Deprecated. IOUtils.forward(AInput, AOutput, long, int)
@Deprecated
public class ByteStreamForwarder
- extends Object
This component just reads data from one stream and writes it to another. This
class is too expensive to provide it in non asynchronous envronment as it
requires thread in synchronous case, but for asynchronous API, it is very
cheap.
- Author:
- const
Method Summary |
Promise<Void> |
start()
Deprecated. start reading from one stream and writing to another. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteStreamForwarder
public ByteStreamForwarder(AByteInput in,
AByteOutput out,
int bufferSize,
boolean autoFlush)
- Deprecated.
- a consturtor
- Parameters:
in
- input streamout
- output streambufferSize
- buffer sizeautoFlush
- if true output will be flushed after each write
start
public Promise<Void> start()
- Deprecated.
- start reading from one stream and writing to another. Note that CoPipe
never flushed output stream and also does not close them.
- Returns:
- Promise that resolves to null if stream is read until end of
stream or problem if there are problems with readin or writing.
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.