Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.crypto.keyring
Class Properties  view Properties download Properties.java

java.lang.Object
  extended bygnu.javax.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.


Field Summary
private  java.util.HashMap props
           
 
Constructor Summary
Properties()
          Creates a new properties object.
 
Method Summary
private  java.lang.String canonicalize(java.lang.String key)
           
 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()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

props

private java.util.HashMap props
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.


containsKey

public boolean containsKey(java.lang.String key)
Tests if this object contains a given property name.


containsValue

public boolean containsValue(java.lang.String value)
Tests if this object contains a given property value.


put

public java.lang.String put(java.lang.String key,
                            java.lang.String value)
Adds a new property to this object.


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.


remove

public java.lang.String remove(java.lang.String key)
Removes a key and its value from this object.


decode

public void decode(java.io.DataInputStream in)
            throws java.io.IOException
Decodes a set of properties from the given input stream.


encode

public void encode(java.io.DataOutputStream out)
            throws java.io.IOException
Encodes this set of properties to the given output stream.


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


canonicalize

private java.lang.String canonicalize(java.lang.String key)