Initializes this message with the specified
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 pduis not valid.
@exception SnmpTooBigException If the resulting encoding does not fitinto maxDataLength bytes.
@exception ArrayIndexOutOfBoundsException If the encoding exceedsmaxDataLength.