org.kth.pdc.grid.utility
Class PrivateKeyReader

java.lang.Object
  extended by org.kth.pdc.grid.utility.PrivateKeyReader

public class PrivateKeyReader
extends Object

This class is used to read a private key.


Constructor Summary
PrivateKeyReader()
           
 
Method Summary
static PrivateKey read(BufferedInputStream bin)
          Reads the private key form the stream that was given in the constructor.
static PrivateKey read(BufferedInputStream bin, org.bouncycastle.openssl.PasswordFinder finder)
          Reads the private key form the stream that was given in the constructor.
static PrivateKey read(BufferedInputStream bin, String passwd)
          Reads the private key form the stream that was given in the constructor.
static void skipLine(BufferedInputStream stream)
           
 
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 PrivateKey read(BufferedInputStream bin,
                              org.bouncycastle.openssl.PasswordFinder finder)
                       throws 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:
KeyException - Thrown if the key reading fails.
Exception

read

public static PrivateKey read(BufferedInputStream bin)
                       throws 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:
KeyException - Thrown if the key reading fails.
Exception

read

public static PrivateKey read(BufferedInputStream bin,
                              String passwd)
                       throws 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:
KeyException - Thrown if the key reading fails.
Exception

skipLine

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


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.