Methods Summary |
---|
public java.nio.ByteBuffer | allocate(boolean useDirect, boolean useView, int size)Allocate a ByteBuffer
|
public int | contentLength()Return the stream content-length. If the content-length wasn't parsed,
return -1.
|
public Handler | getHandler()The Handler associated with this algorithm.
|
public int | getPort()Return the port
|
public java.lang.Class | getReadTask(SelectorThread selectorThread)Return the class responsible for handling OP_READ.
|
public int | headerLength()Return the stream header length. The header length is the length between
the start of the stream and the first occurance of character '\r\n' .
|
public boolean | parse(java.nio.ByteBuffer byteBuffer)Parse the ByteBuffer and try to determine if the bytes
stream has been fully read from the SocketChannel .
|
public java.nio.ByteBuffer | postParse(java.nio.ByteBuffer byteBuffer)After parsing the bytes, post process the ByteBuffer
|
public java.nio.ByteBuffer | preParse(java.nio.ByteBuffer byteBuffer)Before parsing the bytes, initialize and prepare the algorithm.
|
public void | recycle()Recycle the algorithm.
|
public java.nio.ByteBuffer | rollbackParseState(java.nio.ByteBuffer byteBuffer)Rollback the ByteBuffer to its previous state in case
an error as occured.
|
public void | setPort(int port)Set the port this algorithm is used.
|
public void | setSocketChannel(java.nio.channels.SocketChannel socketChannel)Set the SocketChannel used by this algorithm
|