Module org.snmp4j

Class MessageLength

java.lang.Object
org.snmp4j.transport.MessageLength
All Implemented Interfaces:
Serializable

public class MessageLength extends Object implements 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:
  • Constructor Details

    • 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 Details

    • 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.
    • getMessageLength

      public int getMessageLength()
      Returns the total message length (header+payload).
      Returns:
      the sum of getHeaderLength() and getPayloadLength().
    • toString

      public String toString()
      Overrides:
      toString in class Object