|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.snmp.snmp2.SnmpVar | +--com.adventnet.snmp.snmp2.SnmpBitstring
Class of SNMP Bitstring Variable - Sub-class of SnmpVar. This class can be used to create an SnmpVar object of type SnmpString. It also has methods to retrive the value in different forms(eg. String, byte).
Constructor Summary | |
SnmpBitstring(byte[] b)
Constructs a new SnmpBitstring by taking an octet string. |
|
SnmpBitstring(byte[] b,
int size)
This takes a byte array and encodes. |
|
SnmpBitstring(java.lang.String val)
Constructs a new SnmpBitstring taking a string instance as its argument. |
Method Summary | |
java.lang.Object |
getVarObject()
Returns the value of this SnmpBitstring SNMP variable as a String Object. |
byte[] |
toBytes()
To return the value of this SnmpBitstring object as raw bytes. |
java.lang.String |
toString()
To convert the value of this SnmpBitstring object to a printable string used in printing variables. |
java.lang.String |
toTagString()
To convert the value of this SnmpBitstring object to a printable string where the type is tagged before the value with a tag BITSTRING:. |
java.lang.Object |
toValue()
Returns the value of this SnmpBitstring SNMP variable as a string object. |
Methods inherited from class com.adventnet.snmp.snmp2.SnmpVar |
createVariable, getError, getType, getTypeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SnmpBitstring(java.lang.String val)
val
- The string value for creating a new SnmpBitstring object.public SnmpBitstring(byte[] b)
public SnmpBitstring(byte[] b, int size) throws SnmpException
b
- the byte array to be used.size
- the length of the bit stringSnmpException
- is thrown on invalid parameters such
as size less than the total number of bits in the array.Method Detail |
public java.lang.Object getVarObject()
getVarObject
in class SnmpVar
public java.lang.Object toValue()
toValue
in class SnmpVar
public java.lang.String toString()
toString
in class SnmpVar
public java.lang.String toTagString()
toTagString
in class SnmpVar
public byte[] toBytes()
toBytes
in class SnmpVar
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |