net.sf.mmm.util.io.base
Class StreamUtilImpl.BaseTransferrer
java.lang.Object
net.sf.mmm.util.io.base.StreamUtilImpl.AbstractAsyncTransferrer
net.sf.mmm.util.io.base.StreamUtilImpl.BaseTransferrer
- All Implemented Interfaces:
- Callable<Long>, Stoppable
- Direct Known Subclasses:
- StreamUtilImpl.ReaderTransferrer, StreamUtilImpl.StreamTransferrer
- Enclosing class:
- StreamUtilImpl
protected abstract class StreamUtilImpl.BaseTransferrer
- extends StreamUtilImpl.AbstractAsyncTransferrer
This is an abstract implementation of the AsyncTransferrer
interface, that implements Runnable
defining the main flow.
Method Summary |
Long |
call()
|
protected abstract 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 |
callback
private final TransferCallback callback
- The callback or
null
.
StreamUtilImpl.BaseTransferrer
public StreamUtilImpl.BaseTransferrer(TransferCallback callback)
- The constructor.
- Parameters:
callback
- is the callback or null
.
transfer
protected abstract long transfer()
throws IOException
- This method performs the actual transfer.
- Returns:
- the number of bytes that have been transferred.
- Throws:
IOException
- if the transfer failed.
call
public Long call()
throws Exception
-
- Throws:
Exception
Copyright © 2001-2010 mmm-Team. All Rights Reserved.