JCE Provider
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CryptoServerJCEConfig Class Reference

CryptoServerJCEConfig. More...

Public Member Functions

 CryptoServerJCEConfig (InputStream configStream) throws IOException
 Creates a CryptoServerConfig object from the given configuration stream. More...
 
 CryptoServerJCEConfig (String fileName) throws IOException
 Creates a CryptoServerConfig object from the given configuration file. More...
 
void dump ()
 
boolean exist (String key)
 Checks the existance of the given configuration item. More...
 
byte[] getValue (String key, byte[] def)
 Returns the desired configuration value or a default value if the configuration item doesn't exist. More...
 
int getInt (String key, int def) throws NumberFormatException
 Returns the desired configuration value or a default value if the configuration item doesn't exist. More...
 
boolean getBoolean (String key, boolean def) throws NumberFormatException
 Returns the desired configuration value or a default value if the configuration item doesn't exist. More...
 
String getString (String key, String def)
 Returns the desired configuration value or a default value if the configuration item doesn't exist. More...
 
String[] getStringValues (String key, String[] def)
 Returns an array of configuration values. More...
 
void add (String key, String value)
 Adds a configuration item to the configuration object. More...
 

Detailed Description

CryptoServerJCEConfig.

Constructor & Destructor Documentation

◆ CryptoServerJCEConfig() [1/2]

CryptoServerJCEConfig ( InputStream  configStream) throws IOException

Creates a CryptoServerConfig object from the given configuration stream.

Parameters
configStreamStream to read configuration.

◆ CryptoServerJCEConfig() [2/2]

CryptoServerJCEConfig ( String  fileName) throws IOException

Creates a CryptoServerConfig object from the given configuration file.

Parameters
fileNameName of the configuration file including its path.

Member Function Documentation

◆ add()

void add ( String  key,
String  value 
)

Adds a configuration item to the configuration object.

Parameters
keyKeyword name of the configuration item to be added.
valueConfiguration value corresponding to key.

◆ exist()

boolean exist ( String  key)

Checks the existance of the given configuration item.

Parameters
keyKeyword to be checked

◆ getBoolean()

boolean getBoolean ( String  key,
boolean  def 
) throws NumberFormatException

Returns the desired configuration value or a default value if the configuration item doesn't exist.


The values 'true', 'y' or '1' are interpreted as true. The values 'false', 'n' or '0' are interpreted as false.

Parameters
keyConfiguration item to be retrieved.
defDefault value that is returned if the desired item doesn't exist.

◆ getInt()

int getInt ( String  key,
int  def 
) throws NumberFormatException

Returns the desired configuration value or a default value if the configuration item doesn't exist.

Parameters
keyConfiguration item to be retrieved.
defDefault value that is returned if the desired item doesn't exist.

◆ getString()

String getString ( String  key,
String  def 
)

Returns the desired configuration value or a default value if the configuration item doesn't exist.

Parameters
keyConfiguration item to be retrieved
defDefault value that is returned if the desired item doesn't exist

◆ getStringValues()

String[] getStringValues ( String  key,
String[]  def 
)

Returns an array of configuration values.

Multiple configuration items have to be separated by one or more blanks and may span across multiple lines, each ended by a backslash character.

Parameters
keyConfiguration item to be retrieved.
defDefault value that is returned if the desired item doesn't exist.

◆ getValue()

byte[] getValue ( String  key,
byte[]  def 
)

Returns the desired configuration value or a default value if the configuration item doesn't exist.

Parameters
keyConfiguration item to be retrieved
defDefault value that is returned if the desired item doesn't exist