|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ning.http.client.extra.ResumableRandomAccessFileListener
public class ResumableRandomAccessFileListener
A TransferListener
which use a RandomAccessFile
for storing the received bytes.
Constructor Summary | |
---|---|
ResumableRandomAccessFileListener(RandomAccessFile file)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResumableRandomAccessFileListener(RandomAccessFile file)
Method Detail |
---|
public void onBytesReceived(ByteBuffer buffer) throws IOException
RandomAccessFile
, allowing
resumable file download.
onBytesReceived
in interface ResumableListener
buffer
- a ByteBuffer
IOException
public void onAllBytesReceived()
onAllBytesReceived
in interface ResumableListener
public long length()
length
in interface ResumableListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |