public static class MPv3.HeaderData extends java.lang.Object implements BERSerializable
HeaderData
represents the message header information
of SNMPv3 message.Modifier and Type | Field and Description |
---|---|
static byte |
FLAG_AUTH |
static byte |
FLAG_PRIV |
(package private) OctetString |
msgFlags |
(package private) Integer32 |
msgID |
(package private) Integer32 |
msgMaxSize |
(package private) Integer32 |
securityModel |
Constructor and Description |
---|
HeaderData() |
Modifier and Type | Method and Description |
---|---|
void |
decodeBER(BERInputStream message)
Decodes a
Variable from an InputStream . |
void |
encodeBER(java.io.OutputStream outputStream)
Encodes a
Variable to an OutputStream . |
int |
getBERLength()
Returns the length of this
BERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER). |
int |
getBERPayloadLength()
Returns the length of the payload of this
BERSerializable object
in bytes when encoded according to the Basic Encoding Rules (BER). |
int |
getMsgFlags() |
int |
getMsgID() |
int |
getMsgMaxSize() |
int |
getSecurityModel() |
void |
setMsgFlags(int flags) |
void |
setMsgID(int msgID) |
void |
setMsgMaxSize(int msgMaxSize) |
void |
setSecurityModel(int model) |
public static final byte FLAG_AUTH
public static final byte FLAG_PRIV
Integer32 msgID
Integer32 msgMaxSize
OctetString msgFlags
Integer32 securityModel
public void setMsgID(int msgID)
public int getMsgID()
public void setMsgMaxSize(int msgMaxSize)
public int getMsgMaxSize()
public void setMsgFlags(int flags)
public int getMsgFlags()
public void setSecurityModel(int model)
public int getSecurityModel()
public int getBERPayloadLength()
BERSerializable
BERSerializable
object
in bytes when encoded according to the Basic Encoding Rules (BER).getBERPayloadLength
in interface BERSerializable
public int getBERLength()
BERSerializable
BERSerializable
object
in bytes when encoded according to the Basic Encoding Rules (BER).getBERLength
in interface BERSerializable
public void decodeBER(BERInputStream message) throws java.io.IOException
BERSerializable
Variable
from an InputStream
.decodeBER
in interface BERSerializable
message
- an InputStream
containing a BER encoded byte stream.java.io.IOException
- if the stream could not be decoded by using BER rules.public void encodeBER(java.io.OutputStream outputStream) throws java.io.IOException
BERSerializable
Variable
to an OutputStream
.encodeBER
in interface BERSerializable
outputStream
- an OutputStream
.java.io.IOException
- if an error occurs while writing to the stream.