public abstract class BufferedCommandParser<C extends Command> extends AbstractCommandParser<C>
| Modifier and Type | Field and Description |
|---|---|
protected java.nio.ByteBuffer |
buffer |
protected java.nio.channels.ReadableByteChannel |
channel |
| Constructor and Description |
|---|
BufferedCommandParser(java.nio.channels.ReadableByteChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract C |
buildCommand() |
protected boolean |
commandCompleted() |
protected abstract boolean |
commandEnded(byte cur) |
java.nio.channels.ReadableByteChannel |
getChannel() |
C |
readCommand() |
addData, clearData, getData, getListener, reset, setListener, toStringprotected final java.nio.ByteBuffer buffer
protected java.nio.channels.ReadableByteChannel channel
public BufferedCommandParser(java.nio.channels.ReadableByteChannel channel)
protected boolean commandCompleted()
public C readCommand() throws java.io.IOException, DisconnectionException, SyntaxErrorException
java.io.IOExceptionDisconnectionExceptionSyntaxErrorExceptionprotected abstract C buildCommand() throws SyntaxErrorException
SyntaxErrorExceptionprotected abstract boolean commandEnded(byte cur)
public java.nio.channels.ReadableByteChannel getChannel()