|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 ResumableListenerbuffer - a ByteBuffer
IOExceptionpublic void onAllBytesReceived()
onAllBytesReceived in interface ResumableListenerpublic long length()
length in interface ResumableListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||