Module org.snmp4j
Package org.snmp4j.transport
Class DefaultTcpTransportMapping.SnmpMesssageLengthDecoder
- java.lang.Object
-
- org.snmp4j.transport.DefaultTcpTransportMapping.SnmpMesssageLengthDecoder
-
- All Implemented Interfaces:
MessageLengthDecoder
- Enclosing class:
- DefaultTcpTransportMapping
public static class DefaultTcpTransportMapping.SnmpMesssageLengthDecoder extends java.lang.Object implements MessageLengthDecoder
-
-
Constructor Summary
Constructors Constructor Description SnmpMesssageLengthDecoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
getMinHeaderLength
public int getMinHeaderLength()
Description copied from interface:MessageLengthDecoder
Returns the minimum length of the header to be decoded. Typically this is a constant value.- Specified by:
getMinHeaderLength
in interfaceMessageLengthDecoder
- Returns:
- the minimum length in bytes.
-
getMessageLength
public MessageLength getMessageLength(java.nio.ByteBuffer buf) throws java.io.IOException
Description copied from interface:MessageLengthDecoder
Returns the total message length to read (including header) and the actual header length.- Specified by:
getMessageLength
in interfaceMessageLengthDecoder
- Parameters:
buf
- a ByteBuffer with a minimum ofMessageLengthDecoder.getMinHeaderLength()
.- Returns:
- the total message length in bytes and the actual header length in bytes.
- Throws:
java.io.IOException
- if the header cannot be decoded.
-
-