|
|||||||||
| 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).
| Field Summary | |
(package private) byte[] |
byteValue
byteValue is the master value of the OCTETSTRING and is always valid The value of the octet string, never null |
(package private) static byte[] |
s_emptyString
immutable, hence shareable |
(package private) java.lang.String |
value
The String representation of the bit string. |
| Fields inherited from class com.adventnet.snmp.snmp2.SnmpVar |
Type,
varbindErrorVal |
| Constructor Summary | |
(package private) |
SnmpBitstring()
|
|
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 | |
(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. |
java.lang.Object |
getVarObject()
Returns the value of this SnmpBitstring SNMP variable as a String Object. |
(package private) static SnmpVar |
newInstance(byte[] b)
Factory method for decode |
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 |
|
| Field Detail |
static final byte[] s_emptyString
byte[] byteValue
java.lang.String value
| Constructor Detail |
SnmpBitstring()
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 string| Method Detail |
static SnmpVar newInstance(byte[] b)
public java.lang.Object getVarObject()
public java.lang.Object toValue()
public java.lang.String toString()
public java.lang.String toTagString()
public byte[] toBytes()
public java.lang.String getNumericValueAsString()
int encode(byte[] buff,
int space)
throws java.lang.ArrayIndexOutOfBoundsException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||