com.ning.http.client.consumers
Class AppendableBodyConsumer
java.lang.Object
com.ning.http.client.consumers.AppendableBodyConsumer
- All Implemented Interfaces:
- BodyConsumer
public class AppendableBodyConsumer
- extends Object
- implements BodyConsumer
Method Summary |
void |
close()
Invoked when all the response bytes has been processed. |
void |
consume(ByteBuffer byteBuffer)
Consume the received bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppendableBodyConsumer
public AppendableBodyConsumer(Appendable appendable,
String encoding)
AppendableBodyConsumer
public AppendableBodyConsumer(Appendable appendable)
consume
public void consume(ByteBuffer byteBuffer)
throws IOException
- Description copied from interface:
BodyConsumer
- Consume the received bytes.
- Specified by:
consume
in interface BodyConsumer
- Parameters:
byteBuffer
- a ByteBuffer
represntation of the response's chunk.
- Throws:
IOException
close
public void close()
throws IOException
- Description copied from interface:
BodyConsumer
- Invoked when all the response bytes has been processed.
- Specified by:
close
in interface BodyConsumer
- Throws:
IOException
Copyright © 2011. All Rights Reserved.