Package com.ning.http.client.consumers
Class FileBodyConsumer
java.lang.Object
com.ning.http.client.consumers.FileBodyConsumer
- All Implemented Interfaces:
BodyConsumer,ResumableBodyConsumer,Closeable,AutoCloseable
A
RandomAccessFile that can be used as a ResumableBodyConsumer-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconsume(ByteBuffer byteBuffer) Consume the received bytes.longGet the previously transferred bytes, for example the current file size.voidresume()Prepare this consumer to resume a download, for example by seeking to the end of the underlying file.
-
Constructor Details
-
FileBodyConsumer
-
-
Method Details
-
consume
Description copied from interface:BodyConsumerConsume the received bytes.- Specified by:
consumein interfaceBodyConsumer- Parameters:
byteBuffer- aByteBufferrepresntation of the response's chunk.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getTransferredBytes
Description copied from interface:ResumableBodyConsumerGet the previously transferred bytes, for example the current file size.- Specified by:
getTransferredBytesin interfaceResumableBodyConsumer- Throws:
IOException
-
resume
Description copied from interface:ResumableBodyConsumerPrepare this consumer to resume a download, for example by seeking to the end of the underlying file.- Specified by:
resumein interfaceResumableBodyConsumer- Throws:
IOException
-