Module org.snmp4j

Class MessageLength

  • All Implemented Interfaces:
    java.io.Serializable

    public class MessageLength
    extends java.lang.Object
    implements java.io.Serializable
    The MessageLength object contains information about the length of a message and the length of its header.
    Since:
    1.7
    Version:
    1.7
    Author:
    Frank Fock
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MessageLength​(int headerLength, int payloadLength)
      Constructs a MessageLength object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHeaderLength()
      Returns the length of the header.
      int getMessageLength()
      Returns the total message length (header+payload).
      int getPayloadLength()
      Returns the length of the payload.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • MessageLength

        public MessageLength​(int headerLength,
                             int payloadLength)
        Constructs a MessageLength object.
        Parameters:
        headerLength - the length in bytes of the message header.
        payloadLength - the length of the payload.
    • Method Detail

      • getPayloadLength

        public int getPayloadLength()
        Returns the length of the payload.
        Returns:
        the length in bytes.
      • getHeaderLength

        public int getHeaderLength()
        Returns the length of the header.
        Returns:
        the length in bytes.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object