net.sf.mmm.util.io.base
Class StreamUtilImpl.StreamTransferrer
java.lang.Object
net.sf.mmm.util.io.base.StreamUtilImpl.AbstractAsyncTransferrer
net.sf.mmm.util.io.base.StreamUtilImpl.BaseTransferrer
net.sf.mmm.util.io.base.StreamUtilImpl.StreamTransferrer
- All Implemented Interfaces:
- Callable<Long>, Stoppable
- Enclosing class:
- StreamUtilImpl
protected class StreamUtilImpl.StreamTransferrer
- extends StreamUtilImpl.BaseTransferrer
This inner class is used to transfer an InputStream to an
OutputStream.
|
Method Summary |
long |
transfer()
This method performs the actual transfer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
private final InputStream source
- The source to read from (to copy).
destination
private final OutputStream destination
- The destination to write to.
keepDestinationOpen
private final boolean keepDestinationOpen
true if destination should be closed.
StreamUtilImpl.StreamTransferrer
public StreamUtilImpl.StreamTransferrer(InputStream source,
OutputStream destination,
boolean keepDestinationOpen,
TransferCallback callback)
- The constructor.
- Parameters:
source - is InputStream to read from.destination - the OutputStream to write to.keepDestinationOpen - true if the
destination should be closed.callback - is the callback or null.- See Also:
StreamUtilImpl.transfer(InputStream, OutputStream, boolean)
transfer
public long transfer()
throws IOException
- This method performs the actual transfer.
- Specified by:
transfer in class StreamUtilImpl.BaseTransferrer
- Returns:
- the number of bytes that have been transferred.
- Throws:
IOException - if the transfer failed.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.