net.sf.mmm.util.io.base
Class StreamUtilImpl.ReaderTransferrer
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.ReaderTransferrer
- All Implemented Interfaces:
- Callable<Long>, Stoppable
- Enclosing class:
- StreamUtilImpl
protected class StreamUtilImpl.ReaderTransferrer
- extends StreamUtilImpl.BaseTransferrer
This inner class is used to transfer a Reader
to a Writer
.
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 Reader source
- The source to read from (to copy).
destination
private final Writer destination
- The destination to write to.
keepDestinationOpen
private final boolean keepDestinationOpen
true
if destination
should be closed.
StreamUtilImpl.ReaderTransferrer
public StreamUtilImpl.ReaderTransferrer(Reader source,
Writer destination,
boolean keepDestinationOpen,
TransferCallback callback)
- The constructor.
- Parameters:
source
- is Reader
to read from.destination
- the Writer
to write to.keepDestinationOpen
- true
if the
destination
should be closed.callback
- is the callback or null
.- See Also:
StreamUtilImpl.transfer(Reader, Writer, 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.