Class CachedPEMReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.BufferedReader
-
- org.bouncycastle.util.io.pem.PemReader
-
- org.bouncycastle.openssl.PEMParser
-
- eu.emi.security.authn.x509.helpers.CachedPEMReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Readable
public class CachedPEMReader extends org.bouncycastle.openssl.PEMParser
This class extends thePEMParser
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
PEMParser
readPemObject method to return a providedPemObject
. The Reader used by thePEMParser
is not used.- Author:
- K. Benedyczak
-
-
Field Summary
Fields Modifier and Type Field Description protected org.bouncycastle.util.io.pem.PemObject
pem
-
Fields inherited from class org.bouncycastle.openssl.PEMParser
parsers, TYPE_ATTRIBUTE_CERTIFICATE, TYPE_CERTIFICATE, TYPE_CERTIFICATE_REQUEST, TYPE_CMS, TYPE_DSA_PRIVATE_KEY, TYPE_EC_PARAMETERS, TYPE_EC_PRIVATE_KEY, TYPE_ENCRYPTED_PRIVATE_KEY, TYPE_NEW_CERTIFICATE_REQUEST, TYPE_PKCS7, TYPE_PRIVATE_KEY, TYPE_PUBLIC_KEY, TYPE_RSA_PRIVATE_KEY, TYPE_RSA_PUBLIC_KEY, TYPE_TRUSTED_CERTIFICATE, TYPE_X509_CERTIFICATE, TYPE_X509_CRL
-
-
Constructor Summary
Constructors Constructor Description CachedPEMReader(org.bouncycastle.util.io.pem.PemObject pem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.util.io.pem.PemObject
readPemObject()
Generate BC's PemObject from the input stream.
-
-
-
Method Detail
-
readPemObject
public org.bouncycastle.util.io.pem.PemObject readPemObject() throws java.io.IOException
Generate BC's PemObject from the input stream.- Overrides:
readPemObject
in classorg.bouncycastle.util.io.pem.PemReader
- Returns:
- the parsed PEM object
- Throws:
java.io.IOException
- IO exception
-
-