org.gudy.bouncycastle.openssl
Class PEMReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.BufferedReader
          extended by org.gudy.bouncycastle.openssl.PEMReader
All Implemented Interfaces:
Closeable, Readable

public class PEMReader
extends BufferedReader

Class for reading OpenSSL PEM encoded streams containing X509 certificates, PKCS8 encoded keys and PKCS7 objects.

In the case of PKCS7 objects the reader will return a CMS ContentInfo object. Keys and Certificates will be returned using the appropriate java.security type.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
PEMReader(Reader reader)
          Create a new PEMReader
PEMReader(Reader reader, PasswordFinder pFinder)
          Create a new PEMReader with a password finder
PEMReader(Reader reader, PasswordFinder pFinder, String provider)
          Create a new PEMReader with a password finder
 
Method Summary
 Object readObject()
           
 
Methods inherited from class java.io.BufferedReader
close, mark, markSupported, read, read, readLine, ready, reset, skip
 
Methods inherited from class java.io.Reader
read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PEMReader

public PEMReader(Reader reader)
Create a new PEMReader

Parameters:
reader - the Reader

PEMReader

public PEMReader(Reader reader,
                 PasswordFinder pFinder)
Create a new PEMReader with a password finder

Parameters:
reader - the Reader
pFinder - the password finder

PEMReader

public PEMReader(Reader reader,
                 PasswordFinder pFinder,
                 String provider)
Create a new PEMReader with a password finder

Parameters:
reader - the Reader
pFinder - the password finder
provider - the cryptography provider to use
Method Detail

readObject

public Object readObject()
                  throws IOException
Throws:
IOException