xjava.security

Class IJCE_Properties

class IJCE_Properties extends Object

This is a support class providing facilities needed to load and manage properties. It is used by other classes in java.security.*; see those classes for further documentation.

Copyright © 1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.4 $

Author: David Hopwood Jill Baker Raif S. Naffah

Field Summary
static StringLIB_DIRNAME
The name of the directory in which the properties file and (if applicable) native libraries are found.
static StringPRODUCT_NAME
The common name for this class library.
static String[]PROPERTIES_FILES
The filename of the properties file.
Method Summary
static StringgetLibraryPath()
Returns the path of the library directory.
static StringgetProperty(String key)
Gets the value of a property.
static StringgetProperty(String key, String defaultValue)
Gets the value of a property, or returns defaultValue if the property was not set.
static voidlist(PrintStream out)
Lists the properties to the PrintStream out.
static voidlist(PrintWriter out)
Lists the properties to the PrintWriter out.
static EnumerationpropertyNames()
Returns an enumeration of all the property names.
static voidsave(OutputStream os, String comment)
Saves the properties to the OutputStream os, in the format used by java.util.Properties.save.

Field Detail

LIB_DIRNAME

static final String LIB_DIRNAME
The name of the directory in which the properties file and (if applicable) native libraries are found.

PRODUCT_NAME

static final String PRODUCT_NAME
The common name for this class library. This is used for error messages, because most of the code for this class is duplicated between Cryptix and IJCE.

PROPERTIES_FILES

static final String[] PROPERTIES_FILES
The filename of the properties file.

Method Detail

getLibraryPath

static String getLibraryPath()
Returns the path of the library directory. The name of this directory is given by the LIB_DIRNAME constant.

The returned path is always absolute, and ends with a file separator character (e.g. "/" on Unix).

Throws: IOException if an error occurred during intialization, preventing the path from being determined.

getProperty

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

getProperty

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

list

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

list

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

propertyNames

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

save

static void save(OutputStream os, 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.