public class

SnmpStringFixed

extends SnmpString
java.lang.Object
   ↳ com.sun.jmx.snmp.SnmpValue
     ↳ com.sun.jmx.snmp.SnmpString
       ↳ com.sun.jmx.snmp.SnmpStringFixed

Class Overview

Represents an SNMP String defined with a fixed length. The class is mainly used when dealing with table indexes for which one of the keys is defined as a String.

This API is a Sun Microsystems internal API and is subject to change without notice.

Summary

[Expand]
Inherited Constants
From interface com.sun.jmx.snmp.SnmpDataTypeEnums
[Expand]
Inherited Fields
From class com.sun.jmx.snmp.SnmpString
Public Constructors
SnmpStringFixed(byte[] v)
Constructs a new SnmpStringFixed from the specified bytes array.
SnmpStringFixed(Byte[] v)
Constructs a new SnmpStringFixed with the specified Bytes array.
SnmpStringFixed(String v)
Constructs a new SnmpStringFixed from the specified String value.
SnmpStringFixed(int l, byte[] v)
Constructs a new SnmpStringFixed from the specified bytes array with the specified length.
SnmpStringFixed(int l, Byte[] v)
Constructs a new SnmpStringFixed from the specified Bytes array with the specified length.
SnmpStringFixed(int l, String s)
Constructs a new SnmpStringFixed from the specified String with the specified length.
Public Methods
static void appendToOid(int l, SnmpOid source, SnmpOid dest)
Appends an SnmpOid representing an SnmpStringFixed to another OID.
static int nextOid(int l, long[] index, int start)
Scans an index OID, skip the string value and returns the position of the next value.
static SnmpOid toOid(int l, long[] index, int start)
Extracts the fixed-string from an index OID and returns its value converted as an SnmpOid.
[Expand]
Inherited Methods
From class com.sun.jmx.snmp.SnmpString
From class com.sun.jmx.snmp.SnmpValue
From class java.lang.Object

Public Constructors

public SnmpStringFixed (byte[] v)

Constructs a new SnmpStringFixed from the specified bytes array.

Parameters
v The bytes composing the fixed-string value.

public SnmpStringFixed (Byte[] v)

Constructs a new SnmpStringFixed with the specified Bytes array.

Parameters
v The Bytes composing the fixed-string value.

public SnmpStringFixed (String v)

Constructs a new SnmpStringFixed from the specified String value.

Parameters
v The initialization value.

public SnmpStringFixed (int l, byte[] v)

Constructs a new SnmpStringFixed from the specified bytes array with the specified length.

Parameters
l The length of the fixed-string.
v The bytes composing the fixed-string value.
Throws
IllegalArgumentException Either the length or the byte array is not valid.

public SnmpStringFixed (int l, Byte[] v)

Constructs a new SnmpStringFixed from the specified Bytes array with the specified length.

Parameters
l The length of the fixed-string.
v The Bytes composing the fixed-string value.
Throws
IllegalArgumentException Either the length or the Byte array is not valid.

public SnmpStringFixed (int l, String s)

Constructs a new SnmpStringFixed from the specified String with the specified length.

Parameters
l The length of the fixed-string.
s The String composing the fixed-string value.
Throws
IllegalArgumentException Either the length or the String is not valid.

Public Methods

public static void appendToOid (int l, SnmpOid source, SnmpOid dest)

Appends an SnmpOid representing an SnmpStringFixed to another OID.

Parameters
l Unused.
source An OID representing an SnmpStringFixed value.
dest Where source should be appended.

public static int nextOid (int l, long[] index, int start)

Scans an index OID, skip the string value and returns the position of the next value.

Parameters
l The number of successive array elements to be passed in order to get the position of the next value. These elements are passed starting at the start position.
index The index array.
start The position in the index array.
Returns
  • The position of the next value.
Throws
SnmpStatusException There is no string value available at the start position.

public static SnmpOid toOid (int l, long[] index, int start)

Extracts the fixed-string from an index OID and returns its value converted as an SnmpOid.

Parameters
l The number of successive array elements to be retreived in order to construct the OID. These elements are retreived starting at the start position.
index The index array.
start The position in the index array.
Returns
  • The OID representing the fixed-string value.
Throws
SnmpStatusException There is no string value available at the start position.