com.adventnet.snmp.snmp2
Class SnmpNsap
java.lang.Object
|
+--com.adventnet.snmp.snmp2.SnmpVar
|
+--com.adventnet.snmp.snmp2.SnmpString
|
+--com.adventnet.snmp.snmp2.SnmpNsap
- public class SnmpNsap
- extends SnmpString
Class of SNMP NSAP Variable - Sub-class of SnmpString.
The SNMP Nsap type was created for the original version of SMIv2.
However, this new type resulted in incompatibility between SNMPv1 and SNMPv2.
It was removed while updating SMIv2, since its use was not
allowed in IETF-developed MIB modules.
- See Also:
- Serialized Form
|
Constructor Summary |
(package private) |
SnmpNsap()
Empty Constructor |
|
SnmpNsap(byte[] b)
Constructor : Takes an octet string. |
|
SnmpNsap(java.lang.String s)
Constructor takes a String object as its argument. |
|
Method Summary |
(package private) int |
encode(byte[] buff,
int space)
ASN encoder |
java.lang.String |
getNumericValueAsString()
This method will throw UnsupportedOperationException since this
is not a numeric data type. |
(package private) static SnmpVar |
newInstance(byte[] b)
Factory method for decode |
java.lang.String |
toTagString()
Converts the object to a printable string tagged with NSAP: |
| Methods inherited from class java.lang.Object |
,
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
SnmpNsap
SnmpNsap()
- Empty Constructor
SnmpNsap
public SnmpNsap(java.lang.String s)
- Constructor takes a String object as its argument.
SnmpNsap
public SnmpNsap(byte[] b)
- Constructor : Takes an octet string.
newInstance
static SnmpVar newInstance(byte[] b)
- Factory method for decode
- Tags copied from class: SnmpString
- Parameters:
b - The bytearray
return The snmp variable
toTagString
public java.lang.String toTagString()
- Converts the object to a printable string tagged with NSAP:
- Overrides:
- toTagString in class SnmpString
- Tags copied from class: SnmpString
- Returns:
- the value of SnmpString object as a printable string where
the type is tagged before the value with a Tag - STRING: .
getNumericValueAsString
public java.lang.String getNumericValueAsString()
- This method will throw UnsupportedOperationException since this
is not a numeric data type.
- Overrides:
- getNumericValueAsString in class SnmpString
- Returns:
- Nothing is returned since this method throws an exception.
- Throws:
- java.lang.UnsupportedOperationException - Since this
is not a numeric data type.
encode
int encode(byte[] buff,
int space)
throws java.lang.ArrayIndexOutOfBoundsException
- ASN encoder
- Overrides:
- encode in class SnmpString
- Tags copied from class: SnmpString
- Parameters:
buff - The buffer into which the value is to be encodedspace - The number of free bytes in the buffer- Returns:
- The number of free bytes in the buffer
- Throws:
- java.lang.ArrayIndexOutOfBoundsException - When there is
insufficient space in buffer