All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.jaw.snmp.common.SnmpString

java.lang.Object
   |
   +----com.sun.jaw.snmp.common.SnmpValue
           |
           +----com.sun.jaw.snmp.common.SnmpString

public class SnmpString
extends SnmpValue
This class contains octet values.


Constructor Index

 o SnmpString()
Constructs a new empty SnmpString.
 o SnmpString(Byte[])
Constructs a new SnmpString with the specified bytes.
 o SnmpString(byte[])
Constructs a new SnmpString with the specified bytes.
 o SnmpString(String)
Constructs a new SnmpString with the specified JAVA string.

Method Index

 o appendToOid(SnmpOid, SnmpOid)
Append an SnmpOid representing an SnmpString to another Oid.
 o byteValue()
Convert the string to its byte array.
 o clone()
Creates a new object of the same class as this object.
 o duplicate()
Same as clone, but you can not perform cloning using this object because clone is protected.
 o getTypeName()
Returns a textual description of the object.
 o nextOid(long[], int)
Scan an index oid, skip the string value and returns the position of the next value.
 o toByte()
Convert the string to a Byte array.
 o toOid()
Convert the string to its Oid form.
 o toOid(long[], int)
Extract the string from an index oid and returns its value converted as an Oid.
 o toString()
Return the string representation.

Constructors

 o SnmpString
 public SnmpString()
Constructs a new empty SnmpString.

 o SnmpString
 public SnmpString(byte v[])
Constructs a new SnmpString with the specified bytes.

Parameters:
v - The bytes composing the string.
 o SnmpString
 public SnmpString(Byte v[])
Constructs a new SnmpString with the specified bytes.

Parameters:
v - The bytes composing the string.
 o SnmpString
 public SnmpString(String v)
Constructs a new SnmpString with the specified JAVA string.

Parameters:
v - The a string.

Methods

 o toString
 public String toString()
Return the string representation.

Returns:
The string representation.
Overrides:
toString in class Object
 o byteValue
 public byte[] byteValue()
Convert the string to its byte array.

Returns:
The byte array
 o toByte
 public Byte[] toByte()
Convert the string to a Byte array.

 o toOid
 public SnmpOid toOid()
Convert the string to its Oid form.

Returns:
The Oid form
Overrides:
toOid in class SnmpValue
 o toOid
 public static SnmpOid toOid(long index[],
                             int start) throws SnmpStatusException
Extract the string from an index oid and returns its value converted as an Oid.

Returns:
The SnmpOid representing the string value
Throws: SnmpStatusException
There is no string value available at start position
 o nextOid
 public static int nextOid(long index[],
                           int start) throws SnmpStatusException
Scan an index oid, skip the string value and returns the position of the next value.

Returns:
The position of the next value
Throws: SnmpStatusException
There is no string value available at start position
 o appendToOid
 public static void appendToOid(SnmpOid source,
                                SnmpOid dest)
Append an SnmpOid representing an SnmpString to another Oid.

Parameters:
source - An Oid representing an SnmpString value.
dest - Where source should be appened.
 o duplicate
 public final synchronized SnmpValue duplicate()
Same as clone, but you can not perform cloning using this object because clone is protected.

Overrides:
duplicate in class SnmpValue
 o clone
 public synchronized Object clone()
Creates a new object of the same class as this object.

Overrides:
clone in class Object
 o getTypeName
 public String getTypeName()
Returns a textual description of the object.

Returns:
ASN.1 textual description.
Overrides:
getTypeName in class SnmpValue

All Packages  Class Hierarchy  This Package  Previous  Next  Index