org.glite.security.util
Class PrivateKeyReader

java.lang.Object
  extended byorg.glite.security.util.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.
static void skipLine(java.io.BufferedInputStream stream)
           
 
Methods inherited from class java.lang.Object
equals, 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.lang.Exception
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.
java.lang.Exception

read

public static java.security.PrivateKey read(java.io.BufferedInputStream bin)
                                     throws java.lang.Exception
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.
java.lang.Exception

read

public static java.security.PrivateKey read(java.io.BufferedInputStream bin,
                                            java.lang.String passwd)
                                     throws java.lang.Exception
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.
java.lang.Exception

skipLine

public static void skipLine(java.io.BufferedInputStream stream)
                     throws java.io.IOException
Throws:
java.io.IOException