org.edg.security.trustmanager
Class PrivateKeyReader

java.lang.Object
  |
  +--org.edg.security.trustmanager.PrivateKeyReader

public class PrivateKeyReader
extends java.lang.Object

This class is used to read a private key.


Constructor Summary
PrivateKeyReader()
           
 
Method Summary
static java.security.PrivateKey read(java.io.BufferedInputStream bin)
          Reads the private key form the stream that was given in the constructor.
static java.security.PrivateKey read(java.io.BufferedInputStream bin, org.bouncycastle.openssl.PasswordFinder finder)
          Reads the private key form the stream that was given in the constructor.
static java.security.PrivateKey read(java.io.BufferedInputStream bin, java.lang.String passwd)
          Reads the private key form the stream that was given in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrivateKeyReader

public PrivateKeyReader()
Method Detail

read

public static java.security.PrivateKey read(java.io.BufferedInputStream bin,
                                            org.bouncycastle.openssl.PasswordFinder finder)
                                     throws java.security.KeyException
Reads the private key form the stream that was given in the constructor. After the reading, the file mark is at the end of the key.

Returns:
Returns the private key read.
Throws:
java.security.KeyException - Thrown if the key reading fails.

read

public static java.security.PrivateKey read(java.io.BufferedInputStream bin)
                                     throws java.security.KeyException
Reads the private key form the stream that was given in the constructor. After the reading, the file mark is at the end of the key.

Returns:
Returns the private key read.
Throws:
java.security.KeyException - Thrown if the key reading fails.

read

public static java.security.PrivateKey read(java.io.BufferedInputStream bin,
                                            java.lang.String passwd)
                                     throws java.security.KeyException
Reads the private key form the stream that was given in the constructor. After the reading, the file mark is at the end of the key.

Returns:
Returns the private key read.
Throws:
java.security.KeyException - Thrown if the key reading fails.