public static class DefaultTcpTransportMapping.SnmpMesssageLengthDecoder extends java.lang.Object implements MessageLengthDecoder
Constructor and Description |
---|
SnmpMesssageLengthDecoder() |
Modifier and Type | Method and Description |
---|---|
MessageLength |
getMessageLength(java.nio.ByteBuffer buf)
Returns the total message length to read (including header) and
the actual header length.
|
int |
getMinHeaderLength()
Returns the minimum length of the header to be decoded.
|
public int getMinHeaderLength()
MessageLengthDecoder
getMinHeaderLength
in interface MessageLengthDecoder
public MessageLength getMessageLength(java.nio.ByteBuffer buf) throws java.io.IOException
MessageLengthDecoder
getMessageLength
in interface MessageLengthDecoder
buf
- a ByteBuffer with a minimum of MessageLengthDecoder.getMinHeaderLength()
.java.io.IOException
- if the header cannot be decoded.