|
||||||||||
| 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(RandomAccessFile file)
|
|
| Method Summary | |
|---|---|
void |
close()
Invoked when all the response bytes has been processed. |
void |
consume(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(RandomAccessFile file)
| Method Detail |
|---|
public void consume(ByteBuffer byteBuffer)
throws IOException
BodyConsumer
consume in interface BodyConsumerbyteBuffer - a ByteBuffer represntation of the response's chunk.
IOException
public void close()
throws IOException
BodyConsumer
close in interface BodyConsumerIOException
public long getTransferredBytes()
throws IOException
ResumableBodyConsumer
getTransferredBytes in interface ResumableBodyConsumerIOException
public void resume()
throws IOException
ResumableBodyConsumer
resume in interface ResumableBodyConsumerIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||