|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ByteConsumer
The ByteConsumer object is used to consume and process
bytes from a cursor. This is used to consume bytes from a pipeline
and process the content in order to produce a valid HTTP message.
Using a consumer allows the server to gather and process the data
from the stream bit by bit without blocking.
A consumer has completed its task when it has either exhausted its
stream, or when it has consume a terminal token. For instance a
consumer for a HTTP header will have two CRLF bytes
tokens to identify the end of the header, once this has been read
any excess bytes are reset on the cursor and it has finished.
ByteCursor| Method Summary | |
|---|---|
void |
consume(ByteCursor cursor)
This method is used to consume bytes from the provided cursor. |
boolean |
isFinished()
This is used to determine whether the consumer has finished reading. |
| Method Detail |
|---|
void consume(ByteCursor cursor)
throws IOException
ByteCursor object should be
read. If there are no ready bytes then this method return.
cursor - used to consume the bytes from the cursor
IOExceptionboolean isFinished()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||