pdu
. This method initializes the data field with an array of maxDataLength
bytes. It encodes the pdu
. The resulting encoding is stored in the data field and the length of the encoding is stored in dataLength
.
If the encoding length exceeds maxDataLength
, the method throws an exception.
@param pdu The PDU to be encoded.
@param maxDataLength The maximum length permitted for the data field.
@exception SnmpStatusException If the specified pdu
is not valid.
@exception SnmpTooBigException If the resulting encoding does not fitinto maxDataLength
bytes.
@exception ArrayIndexOutOfBoundsException If the encoding exceeds maxDataLength
.
@since 1.5
SnmpPdu
and returns the resulting SnmpMsg
. If this method returns null, the specified SnmpPdu
will be dropped and the current SNMP request will be aborted.
@param p The SnmpPdu
to be encoded.
@param maxDataLength The size limit of the resulting encoding.
@return Null or a fully encoded SnmpMsg
.
@exception SnmpStatusException If pdu
containsillegal values and cannot be encoded.
@exception SnmpTooBigException If the resulting encoding does notfit into maxPktSize
bytes.
@since 1.5
pdu
. This method initializes the data field with an array of maxDataLength
bytes. It encodes the pdu
. The resulting encoding is stored in the data field and the length of the encoding is stored in dataLength
.
If the encoding length exceeds maxDataLength
, the method throws an exception.
@param p The PDU to be encoded.
@param maxDataLength The maximum length permitted for the data field.
@exception SnmpStatusException If the specified pdu
is not valid.
@exception SnmpTooBigException If the resulting encoding does not fitinto maxDataLength
bytes.
@exception ArrayIndexOutOfBoundsException If the encoding exceedsmaxDataLength
.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|