eu.emi.security.authn.x509.helpers
Class CachedPEMReader
java.lang.Object
java.io.Reader
java.io.BufferedReader
org.bouncycastle.util.io.pem.PemReader
org.bouncycastle.openssl.PEMReader
eu.emi.security.authn.x509.helpers.CachedPEMReader
- All Implemented Interfaces:
- Closeable, Readable
public class CachedPEMReader
- extends PEMReader
This class extends the PEMReader
class from the BC library.
It is modified to use the provided PemObject (it is done to optimize the code:
pem is not read twice) as otherwise BC's parsers code would need to be copied.
The reader is bootstraped with the data from the PemObject.
This class interface is the readObject method.
This implementation overrides the
PemReader
readPemObject method to return a provided PemObject
.
The Reader used by the PemReader
is not used.
- Author:
- K. Benedyczak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pem
protected PemObject pem
myPFinder
protected PasswordFinder myPFinder
CachedPEMReader
public CachedPEMReader(PemObject pem,
PasswordFinder pFinder)
CachedPEMReader
public CachedPEMReader(PemObject pem)
readPemObject
public PemObject readPemObject()
throws IOException
- Generate BC's PemObject from the input stream.
- Overrides:
readPemObject
in class PemReader
- Returns:
- the parsed PEM object
- Throws:
IOException
Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.