public class ResumableRandomAccessFileListener extends Object implements ResumableListener
TransferListener which use a RandomAccessFile for storing the received bytes.| Constructor and Description |
|---|
ResumableRandomAccessFileListener(RandomAccessFile file) |
| Modifier and Type | Method and Description |
|---|---|
long |
length()
Return the length of previously downloaded bytes.
|
void |
onAllBytesReceived()
Invoked when all the bytes has been sucessfully transferred.
|
void |
onBytesReceived(ByteBuffer buffer)
This method uses the last valid bytes written on disk to position a
RandomAccessFile, allowing
resumable file download. |
public ResumableRandomAccessFileListener(RandomAccessFile file)
public void onBytesReceived(ByteBuffer buffer) throws IOException
RandomAccessFile, allowing
resumable file download.onBytesReceived in interface ResumableListenerbuffer - a ByteBufferIOExceptionpublic void onAllBytesReceived()
ResumableListeneronAllBytesReceived in interface ResumableListenerpublic long length()
ResumableListenerlength in interface ResumableListenerCopyright © 2014. All Rights Reserved.