Module org.snmp4j

Class DefaultTcpTransportMapping.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SnmpMesssageLengthDecoder

        public SnmpMesssageLengthDecoder()
    • 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 interface MessageLengthDecoder
        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 interface MessageLengthDecoder
        Parameters:
        buf - a ByteBuffer with a minimum of MessageLengthDecoder.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.