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:
Closeable
,AutoCloseable
,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
-
-
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.-
Methods inherited from class java.io.BufferedReader
close, lines, mark, markSupported, read, read, readLine, ready, reset, skip
-
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
-
-
-
Method Detail
-
readPemObject
public org.bouncycastle.util.io.pem.PemObject readPemObject() throws IOException
Generate BC's PemObject from the input stream.- Overrides:
readPemObject
in classorg.bouncycastle.util.io.pem.PemReader
- Returns:
- the parsed PEM object
- Throws:
IOException
- IO exception
-
-