T - Header type.public abstract class FrameReader<T extends FrameHeaderReader>
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
FrameReader(T header) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Reset the state of the reader so that it can be reused to read a new frame.
|
T |
getHeader() |
int |
getHeaderSize() |
byte[] |
getPayload() |
int |
getPayloadSize() |
boolean |
isComplete() |
boolean |
read(TTransport transport)
(Nonblocking) Read available bytes out of the transport without blocking to wait for incoming
data.
|
protected FrameReader(T header)
public boolean read(TTransport transport) throws TSaslNegotiationException, TTransportException
transport - TTransportTSaslNegotiationException - if fail to read back a valid sasl negotiation message.TTransportException - if io error.public T getHeader()
public int getHeaderSize()
public byte[] getPayload()
public int getPayloadSize()
public boolean isComplete()
public void clear()