Package org.snmp4j.mp
Class MPv3.HeaderData
java.lang.Object
org.snmp4j.mp.MPv3.HeaderData
- All Implemented Interfaces:
BERSerializable
- Enclosing class:
MPv3
The
HeaderData represents the message header information of SNMPv3 message.- Version:
- 1.0
- Author:
- Frank Fock
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecodeBER(BERInputStream message) Decodes aVariablefrom anInputStream.voidencodeBER(OutputStream outputStream) Encodes aVariableto anOutputStream.intReturns the length of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).intReturns the length of the payload of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).intintgetMsgID()intintvoidsetMsgFlags(int flags) voidsetMsgID(int msgID) voidsetMsgMaxSize(int msgMaxSize) voidsetSecurityModel(int model)
-
Field Details
-
FLAG_AUTH
public static final byte FLAG_AUTH- See Also:
-
FLAG_PRIV
public static final byte FLAG_PRIV- See Also:
-
-
Constructor Details
-
HeaderData
public HeaderData()
-
-
Method Details
-
setMsgID
public void setMsgID(int msgID) -
getMsgID
public int getMsgID() -
setMsgMaxSize
public void setMsgMaxSize(int msgMaxSize) -
getMsgMaxSize
public int getMsgMaxSize() -
setMsgFlags
public void setMsgFlags(int flags) -
getMsgFlags
public int getMsgFlags() -
setSecurityModel
public void setSecurityModel(int model) -
getSecurityModel
public int getSecurityModel() -
getBERPayloadLength
public int getBERPayloadLength()Description copied from interface:BERSerializableReturns the length of the payload of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).- Specified by:
getBERPayloadLengthin interfaceBERSerializable- Returns:
- the BER encoded length of this variable.
-
getBERLength
public int getBERLength()Description copied from interface:BERSerializableReturns the length of thisBERSerializableobject in bytes when encoded according to the Basic Encoding Rules (BER).- Specified by:
getBERLengthin interfaceBERSerializable- Returns:
- the BER encoded length of this variable.
-
decodeBER
Description copied from interface:BERSerializableDecodes aVariablefrom anInputStream.- Specified by:
decodeBERin interfaceBERSerializable- Parameters:
message- anInputStreamcontaining a BER encoded byte stream.- Throws:
IOException- if the stream could not be decoded by using BER rules.
-
encodeBER
Description copied from interface:BERSerializableEncodes aVariableto anOutputStream.- Specified by:
encodeBERin interfaceBERSerializable- Parameters:
outputStream- anOutputStream.- Throws:
IOException- if an error occurs while writing to the stream.
-