|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.management.snmp.SnmpValue
com.sun.management.snmp.SnmpString
public class SnmpString
Represents an SNMP string.
| Field Summary | |
|---|---|
protected byte[] |
value
This is the bytes array of the string value. |
| Fields inherited from interface com.sun.management.snmp.SnmpDataTypeEnums |
|---|
ApplFlag, BitStringTag, BooleanTag, Counter64Tag, CounterTag, CtxtFlag, errEndOfMibViewTag, errNoSuchInstanceTag, errNoSuchObjectTag, GaugeTag, IntegerTag, IpAddressTag, NsapTag, NullTag, ObjectIdentiferTag, ObjectIdentifierTag, OctetStringTag, OpaqueTag, SequenceTag, TableTag, TimeticksTag, UintegerTag, UnknownSyntaxTag |
| Constructor Summary | |
|---|---|
SnmpString()
Constructs a new empty SnmpString. |
|
SnmpString(byte[] v)
Constructs a new SnmpString from the specified bytes array. |
|
SnmpString(Byte[] v)
Constructs a new SnmpString from the specified Bytes array. |
|
SnmpString(InetAddress address)
Constructs a new SnmpString from the specified InetAddress . |
|
SnmpString(String v)
Constructs a new SnmpString from the specified String value. |
|
| Method Summary | |
|---|---|
static void |
appendToOid(SnmpOid source,
SnmpOid dest)
Appends an SnmpOid representing an SnmpString to another OID. |
static String |
BinToChar(String bin)
Converts the specified binary string into a character string. |
byte[] |
byteValue()
Returns the bytes array of this SnmpString. |
Object |
clone()
Clones the SnmpString object, making a copy of its data. |
SnmpValue |
duplicate()
Performs a clone action. |
String |
getTypeName()
Returns a textual description of the type object. |
static String |
HexToChar(String hex)
Converts the specified hexadecimal string into a character string. |
InetAddress |
inetAddressValue()
Converts the string value to its InetAddress form. |
static int |
nextOid(long[] index,
int start)
Scans an index OID, skips the string value and returns the position of the next value. |
Byte[] |
toByte()
Converts the string value to its array of Bytes form. |
SnmpOid |
toOid()
Converts the string value to its SnmpOid form. |
static SnmpOid |
toOid(long[] index,
int start)
Extracts the string from an index OID and returns its value converted as an SnmpOid. |
String |
toString()
Converts the string value to its String form. |
| Methods inherited from class com.sun.management.snmp.SnmpValue |
|---|
isEndOfMibViewValue, isNoSuchInstanceValue, isNoSuchObjectValue, toAsn1String |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected byte[] value
| Constructor Detail |
|---|
public SnmpString()
SnmpString.
public SnmpString(byte[] v)
SnmpString from the specified bytes array.
v - The bytes composing the string value.public SnmpString(Byte[] v)
SnmpString from the specified Bytes array.
v - The Bytes composing the string value.public SnmpString(String v)
SnmpString from the specified String value.
v - The initialization value.public SnmpString(InetAddress address)
SnmpString from the specified InetAddress .
address - The InetAddress .| Method Detail |
|---|
public InetAddress inetAddressValue()
throws UnknownHostException
InetAddress form.
InetAddress defined by the string value.
UnknownHostException - If string value is not a legal address format.public static String BinToChar(String bin)
bin - The binary string value to convert.
public static String HexToChar(String hex)
hex - The hexadecimal string value to convert.
public byte[] byteValue()
SnmpString.
public Byte[] toByte()
Bytes form.
Bytes representation of the value.public String toString()
String form.
toString in class ObjectString representation of the value.public SnmpOid toOid()
SnmpOid form.
toOid in class SnmpValue
public static SnmpOid toOid(long[] index,
int start)
throws SnmpStatusException
SnmpOid.
index - The index array.start - The position in the index array.
SnmpStatusException - There is no string value
available at the start position.
public static int nextOid(long[] index,
int start)
throws SnmpStatusException
index - The index array.start - The position in the index array.
SnmpStatusException - There is no string value
available at the start position.
public static void appendToOid(SnmpOid source,
SnmpOid dest)
SnmpOid representing an SnmpString to another OID.
source - An OID representing an SnmpString value.dest - Where source should be appended.public final SnmpValue duplicate()
SnmpValue interface.
duplicate in class SnmpValuepublic Object clone()
SnmpString object, making a copy of its data.
clone in class Objectpublic String getTypeName()
getTypeName in class SnmpValue
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||