Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.crypto.keyring
Class Properties

    java.lang.Object
      |
      +--gnu.crypto.keyring.Properties

All Implemented Interfaces:
  java.lang.Cloneable

public class Properties
extends java.lang.Object
implements java.lang.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.

Constructor Summary
`Properties()` Creates a new properties object.

Method Summary
`void` | `clear()` Removes all properties from this object.
`java.lang.Object` | `clone()` Creates a copy of this properties object.
`boolean` | `containsKey(java.lang.String key)` Tests if this object contains a given property name.
`boolean` | `containsValue(java.lang.String value)` Tests if this object contains a given property value.
`void` | `decode(java.io.DataInputStream in)` Decodes a set of properties from the given input stream.
`void` | `encode(java.io.DataOutputStream out)` Encodes this set of properties to the given output stream.
`java.lang.String` | `get(java.lang.String key)` Returns the value mapped by the given key, or null if there is no such mapping.
`java.lang.String` | `put(java.lang.String key, java.lang.String value)` Adds a new property to this object.
`java.lang.String` | `remove(java.lang.String key)` Removes a key and its value from this object.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Properties

    public Properties()

  Creates a new properties object.

Method Detail

### clear

    public void clear()

  Removes all properties from this object.

### clone

    public java.lang.Object clone()

  Creates a copy of this properties object.

  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    The copy.

### containsKey

    public boolean containsKey(java.lang.String key)

  Tests if this object contains a given property name.

  Parameters:
    `key` - The key to test.
  Returns:
    True if this object contains the given key.

### containsValue

    public boolean containsValue(java.lang.String value)

  Tests if this object contains a given property value.

  Parameters:
    `value` - The value to test.
  Returns:
    True if this object contains the given value.

### put

    public java.lang.String put(java.lang.String key,
                                java.lang.String value)

  Adds a new property to this object.

  Parameters:
    `key` - The key, which can neither be null nor empty.
    `value` - The value, which cannot be null.
  Returns:
    The old value mapped by the key, if any.
  Throws:
    `java.lang.IllegalArgumentException` - If either the key or value parameter is null, or if the key is empty.

### get

    public java.lang.String get(java.lang.String key)

  Returns the value mapped by the given key, or null if there is no such mapping.

  Parameters:
    `key` -

### remove

    public java.lang.String remove(java.lang.String key)

  Removes a key and its value from this object.

  Parameters:
    `key` - The key of the property to remove.
  Returns:
    The old value mapped by the key, if any.

### decode

    public void decode(java.io.DataInputStream in)
                throws java.io.IOException

  Decodes a set of properties from the given input stream.

  Parameters:
    `in` - The input stream.
  Throws:
    `java.io.IOException` - If an I/O error occurs.

### encode

    public void encode(java.io.DataOutputStream out)
                throws java.io.IOException

  Encodes this set of properties to the given output stream.

  Parameters:
    `out` - The output stream to encode to.
  Throws:
    `java.io.IOException` - If an I/O error occurs.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.