|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProtocolDecoder
Datagram stream decoder.
Objects implementing this interface are created by Protocol
objects. They
are used to decompose a stream into individual datagrams.
Method Summary | |
---|---|
void |
decode(byte[] buf,
int offset,
int length)
Decode data from the stream. |
byte[] |
getNext()
Get the next datagram. |
boolean |
inputRequired()
Check whether the decoder requires more input. |
Method Detail |
---|
boolean inputRequired()
getNext()
,
false if no datagram is available and the caller should provide more
input using decode(byte[], int, int)
void decode(byte[] buf, int offset, int length)
inputRequired()
returned
true.
buf
- a byte array containing data from the streamoffset
- the start offset in the datalength
- the number of bytesbyte[] getNext()
inputRequired()
returned
false. Otherwise the result is undefined.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |