|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ning.http.client.consumers.FileBodyConsumer
public class FileBodyConsumer
| Constructor Summary | |
|---|---|
FileBodyConsumer(java.io.RandomAccessFile file)
|
|
| Method Summary | |
|---|---|
void |
close()
Invoked when all the response bytes has been processed. |
void |
consume(java.nio.ByteBuffer byteBuffer)
Consume the received bytes. |
long |
getTransferredBytes()
Get the previously transferred bytes, for example the current file size. |
void |
resume()
Prepare this consumer to resume a download, for example by seeking to the end of the underlying file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileBodyConsumer(java.io.RandomAccessFile file)
| Method Detail |
|---|
public void consume(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
BodyConsumer
consume in interface BodyConsumerbyteBuffer - a ByteBuffer represntation of the response's chunk.
java.io.IOException
public void close()
throws java.io.IOException
BodyConsumer
close in interface BodyConsumerjava.io.IOException
public long getTransferredBytes()
throws java.io.IOException
ResumableBodyConsumer
getTransferredBytes in interface ResumableBodyConsumerjava.io.IOException
public void resume()
throws java.io.IOException
ResumableBodyConsumer
resume in interface ResumableBodyConsumerjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||