gnu.crypto.keyring
Class Properties
java.lang.Objectgnu.crypto.keyring.Properties
- Cloneable
public class Properties
extends java.lang.Object
implements Cloneable
A set of (name => value) pairs used in keyring entries.
Keys and values are simple strings, with the key never being empty and
always treated case-insensitively.
void | clear()- Removes all properties from this object.
|
Object | clone()- Creates a copy of this properties object.
|
boolean | containsKey(String key)- Tests if this object contains a given property name.
|
boolean | containsValue(String value)- Tests if this object contains a given property value.
|
void | decode(DataInputStream in)- Decodes a set of properties from the given input stream.
|
void | encode(DataOutputStream out)- Encodes this set of properties to the given output stream.
|
String | get(String key)- Returns the value mapped by the given key, or null if there is no
such mapping.
|
String | put(String key, String value)- Adds a new property to this object.
|
String | remove(String key)- Removes a key and its value from this object.
|
String | toString()
|
Properties
public Properties()
Creates a new properties object.
clear
public void clear()
Removes all properties from this object.
clone
public Object clone()
Creates a copy of this properties object.
- The copy.
containsKey
public boolean containsKey(String key)
Tests if this object contains a given property name.
key - The key to test.
- True if this object contains the given key.
containsValue
public boolean containsValue(String value)
Tests if this object contains a given property value.
value - The value to test.
- True if this object contains the given value.
decode
public void decode(DataInputStream in)
throws IOException Decodes a set of properties from the given input stream.
in - The input stream.
encode
public void encode(DataOutputStream out)
throws IOException Encodes this set of properties to the given output stream.
out - The output stream to encode to.
get
public String get(String key)
Returns the value mapped by the given key, or null if there is no
such mapping.
key -
put
public String put(String key,
String value) Adds a new property to this object.
key - The key, which can neither be null nor empty.value - The value, which cannot be null.
- The old value mapped by the key, if any.
remove
public String remove(String key)
Removes a key and its value from this object.
key - The key of the property to remove.
- The old value mapped by the key, if any.
toString
public String toString()
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.