com.ning.http.client
Interface BodyConsumer

All Known Subinterfaces:
ResumableBodyConsumer
All Known Implementing Classes:
AppendableBodyConsumer, ByteBufferBodyConsumer, FileBodyConsumer, OutputStreamBodyConsumer

public interface BodyConsumer

A simple API to be used with the SimpleAsyncHttpClient class in order to process response's bytes.


Method Summary
 void close()
          Invoked when all the response bytes has been processed.
 void consume(ByteBuffer byteBuffer)
          Consume the received bytes.
 

Method Detail

consume

void consume(ByteBuffer byteBuffer)
             throws IOException
Consume the received bytes.

Parameters:
byteBuffer - a ByteBuffer represntation of the response's chunk.
Throws:
IOException

close

void close()
           throws IOException
Invoked when all the response bytes has been processed.

Throws:
IOException


Copyright © 2011. All Rights Reserved.