- java.lang.Object
-
- org.snmp4j.transport.MessageLength
-
- All Implemented Interfaces:
java.io.Serializable
public class MessageLength extends java.lang.Object implements java.io.Serializable
TheMessageLength
object contains information about the length of a message and the length of its header.- Since:
- 1.7
- Version:
- 1.7
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private int
headerLength
private int
payloadLength
private static long
serialVersionUID
-
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()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
payloadLength
private int payloadLength
-
headerLength
private int headerLength
-
-
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.
-
getMessageLength
public int getMessageLength()
Returns the total message length (header+payload).- Returns:
- the sum of
getHeaderLength()
andgetPayloadLength()
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-