com.adventnet.snmp.snmp2
Class SnmpProperties

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpProperties

class SnmpProperties
extends java.lang.Object


Field Summary
(package private) static java.lang.String PRODUCT_NAME
          The common name for this class library.
(package private) static java.lang.String[] PROPERTIES_FILES
          The names of the properties files.
 
Method Summary
(package private) static void ()
           
static int getIntermediateVersion()
          Returns the intermediate version of this release of Snmp Library.
static int getMajorVersion()
          Returns the major version of this release of Snmp Library.
static int getMinorVersion()
          Returns the minor version of this release of Snmp Library.
static int getPatchVersion()
          Returns the patch version of this release of Snmp Library.
(package private) static java.lang.String getProductName()
           
static java.lang.String getProperty(java.lang.String key)
          Gets the value of a property.
static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
          Gets the value of a property, or returns defaultValue if the property was not set.
static java.lang.String getReleaseDate()
          Returns the release date of this version of Snmp Library, as a string in the form "yyyy/mm/dd".
static java.lang.String getVersionString()
          Returns a string describing this version of Snmp Library.
static boolean isVersionAtLeast(int major, int minor, int intermediate)
          Returns true iff this version of Snmp Library is at least the given version.
static void list(java.io.PrintStream out)
          Lists the properties to the PrintStream out.
static void list(java.io.PrintWriter out)
          Lists the properties to the PrintWriter out.
static void main(java.lang.String[] args)
          Prints the SNMP Library version string, whether SNMP Library is installed correctly, and the location of the library directory.
static java.util.Enumeration propertyNames()
          Returns an enumeration of all the property names.
static void save(java.io.OutputStream os, java.lang.String comment)
          Saves the properties to the OutputStream os, in the format used by java.util.Properties.save.
static java.lang.String setProperty(java.lang.String key, java.lang.String value)
          Set the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRODUCT_NAME

static final java.lang.String PRODUCT_NAME
The common name for this class library.

PROPERTIES_FILES

static final java.lang.String[] PROPERTIES_FILES
The names of the properties files.
Method Detail

getProductName

static java.lang.String getProductName()

getMajorVersion

public static int getMajorVersion()
Returns the major version of this release of Snmp Library.

getMinorVersion

public static int getMinorVersion()
Returns the minor version of this release of Snmp Library.

getIntermediateVersion

public static int getIntermediateVersion()
Returns the intermediate version of this release of Snmp Library.

getPatchVersion

public static int getPatchVersion()
Returns the patch version of this release of Snmp Library.

isVersionAtLeast

public static boolean isVersionAtLeast(int major,
                                       int minor,
                                       int intermediate)
Returns true iff this version of Snmp Library is at least the given version.

getReleaseDate

public static java.lang.String getReleaseDate()
Returns the release date of this version of Snmp Library, as a string in the form "yyyy/mm/dd".

getVersionString

public static java.lang.String getVersionString()
Returns a string describing this version of Snmp Library.

main

public static void main(java.lang.String[] args)
Prints the SNMP Library version string, whether SNMP Library is installed correctly, and the location of the library directory.

static void ()

save

public static void save(java.io.OutputStream os,
                        java.lang.String comment)
Saves the properties to the OutputStream os, in the format used by java.util.Properties.save. The string comment is written as a comment in the first line of the output.

getProperty

public static java.lang.String getProperty(java.lang.String key)
Gets the value of a property.

getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String defaultValue)
Gets the value of a property, or returns defaultValue if the property was not set.

propertyNames

public static java.util.Enumeration propertyNames()
Returns an enumeration of all the property names.

list

public static void list(java.io.PrintStream out)
Lists the properties to the PrintStream out.

setProperty

public static java.lang.String setProperty(java.lang.String key,
                                           java.lang.String value)
Set the property. Some of the properties will take effect only if performed initially in the application, before any of the snmp classes are loaded.

list

public static void list(java.io.PrintWriter out)
Lists the properties to the PrintWriter out.