public class PropertyCredentials extends java.lang.Object implements Credentials
| Constructor and Description |
|---|
PropertyCredentials(java.io.File credentialsFile,
Encryptor encryptor)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get(java.lang.String key)
Returns the credential with the given key.
|
void |
save()
Saves the credentials.
|
void |
set(java.lang.String key,
java.lang.String value)
Sets the credential.
|
public PropertyCredentials(java.io.File credentialsFile,
Encryptor encryptor)
throws java.io.IOException
credentialsFile - Properties file.encryptor - Encryptor.java.io.IOException - If something went wrong while loading the properties file.public java.lang.String get(java.lang.String key)
Credentialsget in interface Credentialskey - Key.public void set(java.lang.String key,
java.lang.String value)
Credentialsset in interface Credentialskey - Key.value - Value.public void save()
throws java.io.IOException
Credentialssave in interface Credentialsjava.io.IOException - If something went wrong while saving.