|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.snmp4j.smi.AbstractVariable
org.snmp4j.smi.UnsignedInteger32
public class UnsignedInteger32
UnsignedInteger32 type is an SNMP type that represents unsigned 32bit integer values (0 to 4294967295).
| Field Summary | |
|---|---|
protected long |
value
|
| Fields inherited from class org.snmp4j.smi.AbstractVariable |
|---|
SMISYNTAXES_PROPERTIES |
| Constructor Summary | |
|---|---|
UnsignedInteger32()
|
|
UnsignedInteger32(byte signedByteValue)
Creates an unsigned integer from a signed byte value. |
|
UnsignedInteger32(int signedIntValue)
Creates an unsigned integer from a signed int value. |
|
UnsignedInteger32(long value)
Creates an UnsignedInteger32 from a long value. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this variable. |
int |
compareTo(java.lang.Object o)
|
void |
decodeBER(BERInputStream inputStream)
Decodes a Variable from an InputStream. |
void |
encodeBER(java.io.OutputStream outputStream)
Encodes a Variable to an OutputStream. |
boolean |
equals(java.lang.Object o)
|
void |
fromSubIndex(OID subIndex,
boolean impliedLength)
Sets the value of this Variable from the supplied (sub-)index. |
int |
getBERLength()
Returns the length of this Variable in bytes when encoded
according to the Basic Encoding Rules (BER). |
int |
getSyntax()
Gets the ASN.1 syntax identifier value of this SNMP variable. |
long |
getValue()
|
int |
hashCode()
|
void |
setValue(long value)
|
void |
setValue(java.lang.String value)
|
int |
toInt()
Returns an integer representation of this variable if such a representation exists. |
long |
toLong()
Returns a long representation of this variable if such a representation exists. |
java.lang.String |
toString()
Gets a string representation of the variable. |
OID |
toSubIndex(boolean impliedLength)
Converts the value of this Variable to a (sub-)index
value. |
| Methods inherited from class org.snmp4j.smi.AbstractVariable |
|---|
createFromBER, createFromSyntax, getBERPayloadLength, getSyntaxFromString, getSyntaxString, getSyntaxString, isDynamic, isException |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected long value
| Constructor Detail |
|---|
public UnsignedInteger32()
public UnsignedInteger32(long value)
UnsignedInteger32 from a long value.
value - a long value which must not be greater 2^32-1 and not less
zero.
java.lang.IllegalArgumentException - if value < 0 or > 2^32-1.public UnsignedInteger32(int signedIntValue)
signedIntValue - a signed int value.public UnsignedInteger32(byte signedByteValue)
signedByteValue - a signed byte value.| Method Detail |
|---|
public void encodeBER(java.io.OutputStream outputStream)
throws java.io.IOException
AbstractVariableVariable to an OutputStream.
encodeBER in interface BERSerializableencodeBER in class AbstractVariableoutputStream - an OutputStream.
java.io.IOException - if an error occurs while writing to the stream.
public void decodeBER(BERInputStream inputStream)
throws java.io.IOException
AbstractVariableVariable from an InputStream.
decodeBER in interface BERSerializabledecodeBER in class AbstractVariableinputStream - an InputStream containing a BER encoded byte stream.
java.io.IOException - if the stream could not be decoded by using BER rules.public int getSyntax()
AbstractVariable
getSyntax in interface VariablegetSyntax in class AbstractVariablepublic int hashCode()
hashCode in interface VariablehashCode in class AbstractVariablepublic int getBERLength()
AbstractVariableVariable in bytes when encoded
according to the Basic Encoding Rules (BER).
getBERLength in interface BERSerializablegetBERLength in class AbstractVariablepublic boolean equals(java.lang.Object o)
equals in interface Variableequals in class AbstractVariablepublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in interface VariablecompareTo in class AbstractVariablepublic java.lang.String toString()
AbstractVariable
toString in interface VariabletoString in class AbstractVariablepublic final void setValue(java.lang.String value)
setValue in interface AssignableFromStringpublic void setValue(long value)
setValue in interface AssignableFromLongpublic long getValue()
public java.lang.Object clone()
Variable
clone in interface Variableclone in class AbstractVariableVariable with the same value.public final int toInt()
AbstractVariable
toInt in interface VariabletoInt in class AbstractVariablepublic final long toLong()
AbstractVariable
toLong in interface AssignableFromLongtoLong in interface VariabletoLong in class AbstractVariablepublic OID toSubIndex(boolean impliedLength)
AbstractVariableVariable to a (sub-)index
value.
toSubIndex in interface VariabletoSubIndex in class AbstractVariableimpliedLength - specifies if the sub-index has an implied length. This parameter applies
to variable length variables only (e.g. OctetString and
OID). For other variables it has no effect.
public void fromSubIndex(OID subIndex,
boolean impliedLength)
AbstractVariableVariable from the supplied (sub-)index.
fromSubIndex in interface VariablefromSubIndex in class AbstractVariablesubIndex - the sub-index OID.impliedLength - specifies if the sub-index has an implied length. This parameter applies
to variable length variables only (e.g. OctetString and
OID). For other variables it has no effect.
|
Copyright 2003-2009 Frank Fock and Jochen Katz (SNMP4J.org) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||