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 Object
implements MessageLengthDecoder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the total message length to read (including header) and the actual header length.intReturns the minimum length of the header to be decoded.
-
Constructor Details
-
SnmpMesssageLengthDecoder
public SnmpMesssageLengthDecoder()
-
-
Method Details
-
getMinHeaderLength
public int getMinHeaderLength()Description copied from interface:MessageLengthDecoderReturns the minimum length of the header to be decoded. Typically this is a constant value.- Specified by:
getMinHeaderLengthin interfaceMessageLengthDecoder- Returns:
- the minimum length in bytes.
-
getMessageLength
Description copied from interface:MessageLengthDecoderReturns the total message length to read (including header) and the actual header length.- Specified by:
getMessageLengthin 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:
IOException- if the header cannot be decoded.
-